Why isn't this simple CRON job working?
Posted
by
JakeRow123
on Ask Ubuntu
See other posts from Ask Ubuntu
or by JakeRow123
Published on 2012-06-10T16:21:30Z
Indexed on
2012/06/10
16:48 UTC
Read the original article
Hit count: 256
I am on Ubuntu server and would like to send an email to myself every 10 minutes (as a test).
The code for that is in this file:
/var/www/cron-test.php
To set up the cron I typed:
crontab -e
and added this line to the bottom of the file using nano editor:
### email me every 10 min.
*/10 * * * * /var/www/cron-test.php
But that script is not running every 10 minutes. I only recieve the email if I load the PHP script directly in my browser. The cron doesn't seem to be executing at all.
What am I doing wrong?
Also this is my first time setting up a cron so putting the cron script in my www folder is probably not a good idea, should I put it elsewhere? If so where?
Also is there a cron error log? Where all failed crons can be seen?
© Ask Ubuntu or respective owner