0

Hi all,

I'm using crontab on Ubuntu 10.04 and I have had 7 tasks running smoothly for about 6 months. I've now created a new script but for some frustrating reason it will be execute. It's a small task that needs to run every two minutes. The issue doesn't reside with the code as if I execute the script manually it works perfectly. The script is written in PHP and I'm running Apache2.

This works fine:
*/5 * * * * php -q /var/tasks/PEQ.php

This does not:
*/2 * * * * php -q /var/tasks/SSC.php

There are no errors being reported by the script, which has error reporting on, and there are no errors being logged by crontab.

Any ideas?

Thanks in advance!

3
Contributors
2
Replies
25
Views
4 Years
Discussion Span
Last Post by CimmerianX
0

are you sure that is not executing?
add log msg at the top of your script:

file_put_contents("/tmp/log.txt", "script executed on " . date('Y-m-d H:i:s'));

then check if the file exists in /tmp

0

To you have the script language defined in the 1st line to be php? From command line, do you just run './SSC.php' and it runs or do you pass it into the scripting language module? Does the script have new external commands that require permissions that the id running this cron doesn't have?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.