Showing results for 
Show  only  | Search instead for 
Did you mean: 
Getting Started

Cron works but does not execute script

Here is my script (everyday at 9am):

/usr/local/bin/php -f /home/kzzsp4tpixtd/public_html/maint.php

I have tried it with the "-q"(quiet mode as well). Godaddy sends me an email that said it "ran", however, when checking my site, it did not.


I know this because the script has a built in email to inform me of a successful run or not, not to mention there is no new material on my site to reflect to new feed obtained.


If I go to my page and url the maint.php script - it works and I get my email saying it was run successfully, and the website has its new material.


Am I missing something? the purpose of the cron is to run everyday at 9am so I do not have to.


Also, does the script need to be called cron.php or is any name ok?


Any other ideas why it is not executing?




Resolver I

Have your cron job log to a file, so you can see what it's doing. See example script.

0 9 * * * /usr/local/bin/php -f /home/kzzsp4tpixtd/public_html/maint.php > /home/kzzsp4tpixtd/cron.log 2>&1


thanks for your suggestion.

Did that, produced a blank log.

The only way I can make the maint.php script run, is if i URL the script.

What else can I try?

At the least, you now know that your cron job did in fact run.

Can you post your script 'maint.php'?

If there is any personal/confidential info, such as user-name and password in the script, just replace the text with *****.

It is most likely a permissions issue, and or file/folder path issue.

Any URL path the script sees when you run it from your web browser, may not be the same as what it sees when it's running from the OS.