A Cron Job That Never Runs: Check These Five Things, In Order
You added the line, saved the file, waited — and nothing happened. Cron is silent by design: no pop-up, no error, no hint. It just does not run the job.
Almost every case is one of five things. Check them in this order; most mysteries end at number one or two.
1. The environment is not your shell
Cron starts jobs with almost no environment. Your PATH from the terminal does not exist here. Neither do the variables you set in .bashrc.
So the classic failure is simple: the command works when you run it, and “command not found” kills it silently under cron.
Fix: use absolute paths (/usr/bin/python3 /home/you/job.py), or set PATH=/usr/bin:/bin at the top of the crontab. If the script needs an API key or a token, set it in the crontab too — the job cannot read your interactive environment.
2. You edited the wrong crontab
Every user has their own crontab, and jobs run as the user who owns them.
crontab -llists yours. If you edited withsudo crontab -e, the job belongs to root.- Files in
/etc/cron.d/need a user column — without it, the line is skipped. - An edit that did not save (or a commented-out line) counts here too. It happens.
Fix: decide which user should run the job, then list that user’s crontab and read it back line by line.
3. The five fields do not mean what you think
This is the quiet one. On sight, these look reasonable:
* */5 * * *— this is every five hours, not minutes. The/5sits in the hour field.0 0 * * *— midnight, not “every minute at zero.” The first field is minutes, not hours.- Day of week:
0and7both mean Sunday, depending on your cron flavor.
Fix: paste the line into the parser. Reading it back in plain English — “every five hours” — catches in three seconds what staring does not. The eight most popular traps have their own page: common cron mistakes.
4. The timezone is not yours
Cron uses the server’s clock and timezone, not yours. A server living on UTC will run your “9 a.m.” job at a different local time than you expect — an hour or two late, or in the middle of the night for your users.
Fix: check the server clock (date, timedatectl). If the box is on UTC, write the line in UTC — or move the job to a timezone-aware scheduler like a systemd timer and stop converting in your head.
5. It runs, then dies instantly
If the job starts and fails, cron does not show you the error. Cron’s log records the start, not the outcome; by default it tries to mail the error somewhere nobody reads.
Fix: send the output to a file and look:
*/10 * * * * /home/you/job.sh >> /home/you/job.log 2>&1
Empty log means the job never started (back to suspects 1–4). An error in the log is your actual answer — a missing permission, a missing shebang, a script that needs bash in front of it.
Still stuck?
If the line reads correctly, the path is absolute, the right user owns it, and the log is still empty — run the job once through the converter on the systemd side. Half the “cron refuses to work” cases on modern servers end with a five-minute timer that behaves better and logs where you can see it.