Wednesday, February 11, 2009

cron not running commands

crontab was not working. Silently, not running the command, not writing anything to /var/log/cron. You can check the syntax of your crontab using:

# crontab /etc/crontab "/etc/crontab":16: bad minute errors in crontab file, can't install.

The problem was in splitting command into more lines using backslash \ at the end of each line.

Simple workaround: Put it on one line.

Do not forget also that the minute column is right to the hour column.