Answer by aneeshep for Why crontab scripts are not working?
Cron daemon is not running. I really screwed up with this some months ago.Type:pgrep cron If you see no number (i.e. cron's main PID), then cron is not running. sudo /etc/init.d/cron start can be used...
View ArticleAnswer by geirha for Why crontab scripts are not working?
Different environmentCron passes a minimal set of environment variables to your jobs. To see the difference, add a dummy job like this:* * * * * env > /tmp/env.outputWait for /tmp/env.output to be...
View ArticleAnswer by user9521 for Why crontab scripts are not working?
Permissions problems are quite common, I'm afraid.Note that a common workaround is to execute everything using root's crontab, which sometimes is a Really Bad Idea. Setting proper permissions is...
View ArticleAnswer by Kangarooo for Why crontab scripts are not working?
Line written in a way crontab doesn't understand. It needs to be correctly written. Here's CrontabHowTo.
View ArticleAnswer by jet for Why crontab scripts are not working?
Cron is calling a script that is not executable.By running chmod +x /path/to/script, the script becomes executable and this should resolve this issue.
View ArticleAnswer by user4124 for Why crontab scripts are not working?
My top gotcha: If you forget to add a newline at the end of the crontab file. In other words, the crontab file should end with an empty line.Below is the relevant section in the man pages for this...
View ArticleAnswer by Adam Matan for Why crontab scripts are not working?
Absolute path should be used for scripts:For example, /bin/grep should be used instead of grep:# m h dom mon dow command0 0 * * * /bin/grep ERROR /home/adam/run.log &> /tmp/errorsInstead of:# m...
View ArticleWhy crontab scripts are not working?
Often, crontab scripts are not executed on schedule or as expected. There are numerous reasons for that:wrong crontab notationpermissions problemenvironment variablesThis community wiki aims to...
View Article