5 ms·
As someone about to write a cron job, what ways do you see Cron fail? My assumption is that cron is robust and reliable, it's the job script itself that may fa
by josho 10y ago
As someone about to write a cron job, what ways do you see Cron fail?
My assumption is that cron is robust and reliable, it's the job script itself that may fail silently and need monitoring, yes?
- augustflanagan 10y agoYeah, I'd say your assumption is correct. However, other common ways that I've seen cron "fail" is for the cron entry to being installed in the wrong user's crontab, the permissions on a script changing such that it can't be executed, temporarily disabling or removing a cron job and forgetting to re-enable it, etc.
- SteveNuts 10y agoThe most common failure I've seen is when people forget to use full paths in cron. bash instead of /bin/bash (or similar)
- wagmo 10y agoThere's other weirdness in cron-land too. Cron will completely ignore files containing "." .
- Procrastes 10y agoMy favorite is forgetting a newline at the end of the crontab. I always put a warning at the bottom of my crontabs. # Always end with a newline!
- yogeshnachnani 10y agoThe cron process can be killed by the oom_killer, resulting in missed crons. This may be aggrevated If the cron service is never respawned later.