[WHP1.18] Why is my scheduled task (CRON job) not running?

If the scheduled task did not run check the following before contacting support.

1) The file permissions for the script are set correctly, 711 or 755.

2) Be sure that you specify the script interpreter path in the scheduled task path, otherwise the server will not be able to interpret your script code:
- for perl /usr/bin/perl
- for php4 /usr/bin/php
- for php5 /usr/bin/php5

For example, if you're using a PHP5 script located in a subdirectory of your webspace's public_html folder, the full scheduled task path would be:
/usr/bin/php5 /home/sites/domainname.com/public_html/cron/

3) If the script being run is adapted from a cgi script be sure to make the necessary changes as the scheduled task is run by the shell statement such as #!/usr/bin/perl which is needed for cgi, and will be interpreted as a comment.


If you're still having problems, use the test function to help diagnose the issue. You could also add some debugging code to your scheduled task script to see how far it gets or see where it fails.
The output code should be emailed to you once the script finishes running, you can specify where this should be emailed to in the scheduled task section in your Hosting cPanel v7.5 control panel.

Was this answer helpful?

 Print this Article

Also Read

[WHP1.04] I can't see the images on my website. Why?

There are several possible reasons why your images are not showing up on your pages as...

[WHP1.02] A custom filetype isn't being recognised, how can I make sure it is?

You can force this through using a '.htaccess' file. Remember that the directives inside an...

[WHP1.23] I've created a cgi-bin inside my public_html folder, placed my script into it and yet it can't be found. Why?

The 'cgi-bin' is a protected folder name and will always point to the cgi-bin in the root of the...

[WHP1.24] Why am I getting a 550 error when trying to create folders in file manager?

This suggests a permissions problem related to the creation of the account. You should contact...

[WHP1.25] I've uploaded files to File manager but cannot see them, they were recently visible. What's happened?

File manager has a 5mb memory limit which restricts the number of files that can be displayed if...