Why does my cron job run at the wrong time?
By TechCompare · Updated · How we check
Always set CRON_TZ in your crontab if you care about local time. Prefer UTC for server jobs and document that decision. For DST safety, check the behavior of your cron implementation and make the job idempotent. systemd separates wall-clock OnCalendar= timers from monotonic On*Sec= timers, so choose the one that matches whether the schedule is tied to a civil time or an elapsed interval.
Cron evaluates schedules against the system's local timezone, not UTC. This causes two classes of bugs: the server is set to UTC but you wrote the schedule in your local time, or the server is in a DST-observing timezone and your job skips or duplicates when the clocks change. Both are preventable.
How this is calculated
On a UTC server, a 0 2 * * * job runs at 2 AM UTC. If you're in US Eastern time and thought '2 AM my time,' the job actually fires at 10 PM Eastern (or 9 PM depending on DST).
The fix is to either set CRON_TZ=America/New_York in your crontab or adjust the hours: 0 7 * * * for 2 AM Eastern in standard time, 0 6 * * * during DST.
DST behavior depends on the cron implementation. In Cronie, a fixed-time job in the skipped spring-forward interval runs immediately, and a duplicated fall-back time is not run twice when the clock change is under three hours. Other cron daemons may differ, so test the daemon and make the job idempotent.
Verdict
Set CRON_TZ in the crontab where your daemon supports it, and check how it handles DST. On a UTC box, 0 2 * * * fires at 2 AM UTC even if you expected 2 AM local time, so shift to 0 7 for Eastern standard or 0 6 during DST.
Do not treat skipped or repeated DST times as universal cron behavior. Cronie documents its own spring-forward and fall-back rules, while systemd offers separate wall-clock and monotonic timer types.
More Cron scenarios
Related guides
Frequently asked questions
Does cron use UTC or local time?
How do I make a cron job run in a specific timezone?
What happens to cron jobs during daylight saving time changes?
Related tools
Unix Timestamp
Convert between Unix timestamps and human-readable dates.
Use toolCHMOD Configurator
Calculate Linux file permissions using checkboxes or octal numbers, then view the matching symbolic notation.
Use toolText Encoding Converter
Convert text to Base64, binary, hex, URL encoding and HTML entities, and back again.
Use tool