cron job not running on Linode VPS?
I signed up for a Linode 512 recently. I've been running a Django app on it, and so far so good. But I can't seem to get cron to run a Python script I set up.
I followed the instructions at
warren@plato:~$ crontab -l
0 0 * * * python /home/warren/code/habitbot/manage.py geninstances
warren@plato:~$ ps -el | grep cron
5 S 0 1631 1 0 80 0 - 1099 ? ? 00:00:00 cron
I added that command by doing crontab -e. I expected it to run the script every day at midnight. Also using @daily and @hourly instead of 0 0 * * * seemed to have no effect.
The script runs fine when I run the command string by hand as the user "warren".
But the database records the script should create don't seem to be getting created. The script prints stuff to stderr, so if cron is logging the output, where would I go to find it? Cron said it would send mail to my account, but I don't have any mail:
warren@plato:~$ mail
No mail for warren
Am I missing something obvious? Thanks!
4 Replies
service cron restart
or
service crond restart
should do it depending on your distro
0 0 * * * /usr/bin/python /home/warren/code/habitbot/manage.py geninstances