Which files can be executed with crontab

Which files can be executed with crontab

There are no specific file types that can or cannot be executed from your account. During our tests, the three most commonly used scripts showed excellent cron job compatibility. These are PHP, Perl/CGI and bash scripts - with the corresponding extensions *.php, *.pl and *.sh, respectively. The most important thing to remember is that files included in a cronjob entry should be Unix executables; in other words - should have execute permissions set. You can do that using our File Manager (the Site Management > File Manager section of your Web Hosting Control Panel). Simply click on the desired file and set the permissions to 700 or 755 (the more commonly used format). When specifying a new Perl cron job from our Crontab menu, we strongly recommend that you include the command perl at the start of the "Command to execute" field in order to achieve optimal level of support. Without doing that, the cron job may not be executed properly and the output will not be sent at all.

Another particularity is related to bash scripts - when receiving the output of a cron task to your email address, you may also get an error stating “TERM environment variable not set” in addition to the rest of the output. The easiest way to resolve this error is by starting your bash script files with the following code:

#!/bin/bash
TERM=linux
export TERM

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

I receive "Warning: include() function.include"

If you're experiencing issues with php function include (warnings in php / html code), please...

I made changes inside my .htaccess and now my scripts don't work properly!

.htaccess file contains custom apache configurations. You should be extra careful prior any...

What is class C IP?

An IP consist of 4 parts: AAA.BBB.CCC.DDD. So any IP under the last part will be in the same...

The Website

A website is usually made up of one or two things: Files (.htm, .html, .jpg, .gif, .php, etc)...

500 errors or "Unable to include potential exe"

If you use Server Side Includes, you may receive 500 error or "[Thu Jul 30 00:04:46 2009]...

Powered by WHMCompleteSolution