Posted May 7th, 2013
So I recently noticed a client’s system wasn’t running the cron jobs we had setup in crontab. Everything looked normal. Originally it was written like this:
MAILTOemail@example.com DJANGO_SETTINGS_MODULE="client.settings.dev" 0 * * * * /path/to/script.py
Did you spot the problem? No ok good, I feel a little better. As it turns out we were not seeing and understanding the following log entry to syslog:
ERROR (Missing newline before EOF, this crontab file will be ignored)
Does that help you spot it? The MAILTO= is missing quotes around its value! *sigh* It should read:
MAILTO="firstname.lastname@example.org" DJANGO_SETTINGS_MODULE="client.settings.dev" 0 * * * * /path/to/script.py
It’s an easy thing to miss and kinda embarrassed it took me ...