Cron Cheat Sheet
Field order and ranges, every special character, the four dialects compared, and a table of the schedules people actually write.
Frequently asked questions
What is the difference between */5 and 0/5?
Nothing, in practice. */5 means "every 5 starting from the lowest value" and 0/5 means "starting at 0, every 5" — the same set. Quartz documentation prefers 0/5 and Unix documentation prefers */5. Both are accepted by both.
Does cron guarantee my job runs exactly once?
No, and this is the assumption that causes the most damage. Schedulers retry on failure, distributed schedulers can fire on more than one node, a daylight-saving change can duplicate or skip an hour, and a machine that was asleep may run a missed job late. Make scheduled jobs idempotent — that is cheaper than making the scheduler exact.
What happens if my job takes longer than the interval?
It depends on the scheduler. Unix cron will happily start a second copy while the first is running; Kubernetes CronJobs let you choose with concurrencyPolicy; Quartz can be told the job is non-concurrent. If overlap matters, take a lock inside the job rather than relying on the schedule to prevent it.
Which field is the day of week?
The last one in standard cron (five fields), the last one before the year in Quartz and EventBridge. Miscounting it is common because the day-of-month field sits directly before the month field, so an expression reads as "day, month, weekday" rather than the "day, weekday, month" people expect.
Found a mistake on this page? Tell me — a page that is confidently wrong is worse than no page.