How is Quartz cron different?
Quartz uses six or seven fields where Unix crontab uses five. The extra leading field is seconds, and an optional trailing field is the year. That alone breaks most expressions copied between the two: paste a five-field crontab line into Quartz and it is read as seconds-through-day-of-week, so a job meant for 09:00 fires at a different time entirely.
Quartz also adds characters crontab has no equivalent for. ? means "no specific value" and is required in exactly one of day-of-month and day-of-week, because Quartz forbids specifying both. L is the last day, W the nearest weekday, and # picks the nth weekday of a month — the syntax you need for "the second Friday".
Cron expressions are comprised of 6 required fields and one optional field.
Features
- Seconds and year fields
- The field breakdown labels six or seven fields correctly, so a value in the wrong position is visible rather than inferred from a schedule that fires at the wrong time.
- The ? rule, made visible
- Quartz requires ? in exactly one of day-of-month and day-of-week. Reading the expression back in words is how you catch having * in both, which Quartz rejects outright.
- L, W and # explained
- The description names what these do in the expression you actually pasted, rather than leaving you to match them against a syntax table.
- No run times, on purpose
- Expressions using Quartz-only characters do not get a next-run list here. The available parsers read ? and L differently from Quartz, and a wrong time on a page people visit to verify a schedule is worse than no time.
How to use
- 1
Paste the expression
Six fields (seconds first) or seven with a trailing year.
- 2
Read the sentence
The expression is translated into plain words directly beneath the input.
- 3
Check the field breakdown
Each field is labelled, so a crontab expression pasted by mistake shows up immediately as one field short.
- 4
Verify in Quartz itself
For expressions using ? L W or #, confirm the firing times in your own scheduler — this page deliberately does not guess them.
Frequently asked questions
How many fields does a Quartz cron expression have?
Six are required — seconds, minutes, hours, day-of-month, month, day-of-week — and a seventh optional field is the year. Unix crontab has five and no seconds field, which is why expressions do not move between them unchanged.
What does ? mean in Quartz?
No specific value. Quartz does not allow you to constrain both day-of-month and day-of-week, so exactly one of them must be ?. Using * in both is an error, and it is the most common mistake when adapting a crontab line.
What are L, W and #?
L is the last day of the month or the last given weekday; W is the nearest weekday to a given day; # selects the nth weekday of the month, so 6#2 is the second Friday. Standard crontab has none of these.
Why can I paste a crontab expression and get a description anyway?
Because the description is produced from the field count. A five-field line is described as crontab, which is correct — but Quartz will reject it, since Quartz requires the seconds field. The field breakdown makes the mismatch visible.
Does Spring use the same syntax?
Spring's @Scheduled takes six fields with seconds first, like Quartz, but does not support the year field and handles L and # differently by version. Check against your Spring version for anything beyond the basic fields.
If you hit this
Specifications this follows
- Quartz — CronTrigger Tutorial — The field list, the ? rule, and the special characters L, W and #.
- crontab(5) — Linux manual page — The five-field form Quartz expressions are usually adapted from.
Related tools
- Cron Expression ReaderRead a cron expression back in plain words, and see the next five times it fires.
- Unix Timestamp ConverterTurn an epoch number into a real date — and tell seconds from milliseconds.
- Regex TesterTest a regular expression as you type, see every match and group, and read the pattern back in words.