Cron Explainer
Five fields is Vixie. Six is Quartz.
Five fields is Vixie. Six is Quartz. If you paste a Quartz expression into crontab, the minutes become hours and the job runs all day.
Paste the expression. Read the next few run times. If those times look insane, you have the wrong flavor, not a wrong clock.
How to use it
- Vixie/crontab is
minute hour day-of-month month day-of-week(0–6, Sunday = 0 or 7). Quartz isseconds minute hour day-of-month month day-of-weekand often a year. - In Vixie, day-of-month and day-of-week are OR, not AND.
0 0 1 * 1is “the 1st of the month, or every Monday,” not “Monday the 1st.” *vs?: Quartz needs?in one of the day fields. Vixie has no?. If you see a question mark, this is not crontab.@hourly/@dailyare wrappers, not expressions. They are not portable to Quartz.
When it breaks
- DST: a job at 02:30 either skips or runs twice on the changeover. Don't schedule inside the missing hour.
- Sunday is 0 or 7 in Vixie and 1 or 7 in Quartz depending on the docs you read. Check the next-run list, don't argue with the number.
- This explains the schedule. It will not tell you if the box was asleep and missed it.
Explain Cron Expression
Paste expression to understand
This cron expression means:
At 09:00 AM, Monday through Friday
Field Breakdown
0 09 9* every day of month* every month1-5 1 through 5* any value
, value list
- range
/ step
Features
- Plain-English read of 5-field Vixie cron and 6-field Quartz
- Calls out DOM + DOW both restricted: Vixie ORs those fields
- Flags DST skips and repeats around the spring/fall transition
- Field-by-field breakdown (minute hour DOM month DOW, plus seconds for Quartz)
Common Use Cases
- Decode a crontab before you assume it means AND on day-of-month and weekday
- Tell a 6-field Spring/Quartz string from a 5-field Linux crontab
- Check whether 0 2 * * * fires twice or not at all on a DST night
- Document a legacy schedule without running it
Five fields is Vixie. Six is Quartz.
Five fields is Vixie. Six is Quartz. If you paste a Quartz expression into crontab, the minutes become hours and the job runs all day.
Paste the expression. Read the next few run times. If those times look insane, you have the wrong flavor, not a wrong clock.
Vixie/crontab is minute hour day-of-month month day-of-week (0–6, Sunday = 0 or 7). Quartz is seconds minute hour day-of-month month day-of-week and often a year. In Vixie, day-of-month and day-of-week are OR, not AND. 0 0 1 * 1 is “the 1st of the month, or every Monday,” not “Monday the 1st.”
* vs ?: Quartz needs ? in one of the day fields. Vixie has no ?. If you see a question mark, this is not crontab. @hourly / @daily are wrappers, not expressions. They are not portable to Quartz.
Examples
0 0 1 * 130 4 * * 1-50 0 12 * * ?65 * * * *Frequently Asked Questions
Five fields is Vixie. Six is Quartz. If you paste a Quartz expression into crontab, the minutes become hours and the job runs all day. Vixie/crontab is minute hour day-of-month month day-of-week (0–6, Sunday = 0 or 7). Quartz is seconds minute hour day-of-month month day-of-week and often a year.
In Vixie, day-of-month and day-of-week are OR, not AND. 0 0 1 * 1 is “the 1st of the month, or every Monday,” not “Monday the 1st.”
* vs ?: Quartz needs ? in one of the day fields. Vixie has no ?. If you see a question mark, this is not crontab. @hourly / @daily are wrappers, not expressions. They are not portable to Quartz.
DST: a job at 02:30 either skips or runs twice on the changeover. Don't schedule inside the missing hour. Sunday is 0 or 7 in Vixie and 1 or 7 in Quartz depending on the docs you read. Check the next-run list, don't argue with the number. This explains the schedule. It will not tell you if the box was asleep and missed it.
Tips
- If both DOM and DOW are not *, assume OR on Linux until you prove the daemon is Quartz.
- GitHub Actions and K8s CronJobs are UTC. Write the expression for UTC, not your laptop timezone.
- Avoid 0 2 * * * in America/New_York. Use 30 7 * * * UTC instead.