Easy Crontab Mistake

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:

[email protected]

0 * * * * /path/to/

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="[email protected]"

0 * * * * /path/to/

It’s an easy thing to miss and kinda embarrassed it took me so long to spot it myself. Hopefully, this post will help others avoid it in the future.

Posted 07 May 2013

Headshot of Frank Wiles

Frank Wiles

Founder and President of REVSYS and current President of the Django Software Foundation. Web/Ops maven specializing in scaling complex web applications. Want to reach out? Contact me here or use the social links below.