I'm trying to set a cronjob to run every 20 minutes. This works manually:
php /srv/www/mysite.co.uk/public_html/PP/Make_XML.php LONDON
I tried to use "crontab -e" and set it even to every 20 minutes with:
*/20 * * * * php /srv/www/mysite.co.uk/public_html/PP/Make_XML.php LONDON
it was saved to /tmp/crontab.0xYhei9m/crontab
And it doesn't seem to work. What's wrong here?
EDIT:
Current stats:
*. cron is up and running:
root 31855 1 0 08:39 ? 00:00:00 /usr/sbin/cron
*. Running "crontab -l" shows:
*/20 * * * * /usr/bin/php /srv/www/mysite.co.uk/public_html/PP/Make_XML.php LONDON
And still no go. Again manually running the script works just fine.
Check permissions Another user might have created the cron job and you may not be authorized to execute it. Note that the root must own jobs added as files in a /etc/cron. */ directory. That means that if you don't have root permissions, you might not be able to access the job.
The cron reads the crontab (cron tables) for running predefined scripts. By using a specific syntax, you can configure a cron job to schedule scripts or other commands to run automatically.
is the cron daemon even running?
it was saved to /tmp/crontab.0xYhei9m/crontab
Yes - that's the file you just edited - its NOT the file crond reads to fire jobs. Crontab whould then read this file, install the updated crontab in the location where crond looks for it and notify crond it needs to process the file.
Have you checked:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With