Often, crontab
scripts are not executed on schedule or as expected. There are numerous reasons for that:
- wrong crontab notation
- permissions problem
- environment variables
This community wiki aims to aggregate the top reasons for crontab
scripts not being executed as expected. Write each reason in a separate answer.
Please include one reason per answer - details about why it's not executed - and fix(es) for that one reason.
Please write only cron-specific issues, e.g. commands that execute as expected from the shell but execute erroneously by cron.
crontab -e
for the cron to take affect. For instance using vim I edit the file and use:w
to write it but the job is not added to cron until I quit also. So I will not see the job until after I:q
also.