The standard: five fields
POSIX/Vixie cron — the syntax used by Linux crontabs, GitHub Actions, and most cloud schedulers — uses exactly five whitespace-separated fields: minute, hour, day-of-month, month, day-of-week. 30 2 * * * means "2:30 AM daily." Each field independently accepts * (any value), a number, a comma-separated list, a range (1-5), or a step (*/15).
The "extended" six-field variant
Some schedulers — notably Quartz (used in many Java frameworks) and some Windows-oriented tools — add a seconds field at the front, making it six fields total: 0 30 2 * * * (seconds, minute, hour, day, month, weekday). Quartz also diverges further: it uses ? to mean "no specific value" for whichever of day-of-month/day-of-week isn't being constrained, and disallows setting both simultaneously — the opposite of POSIX cron's OR-based behavior when both are set.
| Field count | Family | Leading field | Day fields when both set |
|---|---|---|---|
| 5 | POSIX/Vixie cron | Minute | OR'd together |
| 6 | Quartz | Seconds | Mutually exclusive (? required on one) |
Why this matters practically
Pasting a five-field expression into a system expecting six (or vice versa) silently shifts every field one position — a 30 2 * * * meant as "2:30 AM" becomes, in a six-field seconds-first reading, "second 30, minute 2 past the hour, every hour" — a completely different schedule with no error thrown. Always check which family your specific tool documents before assuming the field count.
Common mistakes
- Assuming all "cron syntax" is five fields. Quartz-based schedulers (many enterprise Java job schedulers) expect six, seconds-first.
- Setting both day-of-month and day-of-week in Quartz without
?. Quartz requires exactly one of them to be?— POSIX cron has no such restriction and instead ORs both fields when both are set. - Copying an expression between ecosystems unchanged. A working Quartz expression pasted into a plain crontab (or vice versa) will parse without error but run at the wrong time.
FAQ
How many fields does standard Linux cron use?
Five: minute, hour, day-of-month, month, day-of-week.
Why does my scheduler expect six fields?
It's likely Quartz-based (common in Java ecosystems), which adds a leading seconds field.
Can I tell which syntax a tool uses just by reading an example?
Usually, yes — a leading field with values 0–59 that isn't clearly "minute" in context, or a ? character, is a strong signal of the Quartz six-field variant.
Paste any expression into the Cron Expression Descriptor to see a plain-English breakdown of each field.