Quartz Cron Tool
Parse and build Quartz cron expressions — seconds, year field, ? L W # tokens — with next fire times in any timezone, entirely on this device.
The plain-English description appears here.
Token legend
- * — every value
- ? — no specific value; day-of-month or day-of-week must use it
- , — list of values
- - — range of values
- / — step: start/interval
- L — last day of the month; L-3 = 3 days before month end; 6L = last Friday
- W — nearest weekday to a day; LW = last weekday; never crosses the month
- # — nth weekday of the month: 6#3 = third Friday (#6 is refused — no month has six)
- Year — optional 7th field, 1970–2099
- Quartz counts weekdays 1=SUN … 7=SAT; classic cron counts 0/7=SUN
| # | UTC | UTC time | DST |
|---|---|---|---|
| Fire times for a valid expression appear here. | |||
——History
Valid expressions you run are kept here — on this device only.
Press ? for shortcuts
Do it offline:$ npx cronstrue "0 0 12 L * ?"
How to use it
- Type or paste a Quartz expression — six or seven space-separated fields, seconds first.
- Read the description and validity badge; diagnostics sit beside your input, never rewriting it.
- Check the next ten fire times in any timezone; the DST column marks offset changes.
- Copy the expression or its Java and Spring snippets, or flip to the Builder tab — controls there offer only valid choices.
Quartz reads cron its own way: seconds come first, weekdays count 1 = SUN through 7 = SAT, an optional year field ends the line, and either day-of-month or day-of-week must carry a question mark. Paste an expression to see it explained and projected as fire times in any timezone, or compose one in the Builder tab. Everything — parsing, description, fire-time math — happens in this tab.
How it works
A tokenizer validates every token of the six or seven fields first: numeric bounds, names like MON-FRI, steps and ranges, and the placement rules for ?, L, W and #.
Only a valid schedule reaches the describer, which speaks Quartz numbering — 6#3 is a Friday, never a Saturday — with each phrasing pinned by a golden vector pack so upgrades cannot change what you read.
Fire times take one of two paths: plain schedules run through the cron-parser iterator with weekdays remapped and the year field as a bounded filter, while L, W and # switch to in-house calendar math that walks month by month in your chosen zone.
A row gets a DST flag when the zone's UTC offset differs from 24 hours earlier — the fires where wall-clock schedules drift, skip or repeat.
Examples
0 0/15 8-17 ? * MON-FRIEvery 15 minutes, between 08:00 and 17:59, Monday through FridayThe hours field picks whole hours: 8-17 runs to 17:59, and the day's last fire is 17:45. The ? leaves day-of-month open.
0 0 12 L * ?At 12:00, on the last day of the monthL tracks the real calendar: the 31st, the 30th, February 28 — or 29 in a leap year.
0 15 10 ? * 6#3At 10:15, on the third Friday of the monthQuartz counts 1 = SUN, so this 6 is Friday — crontabs read it as Saturday. FRI#3 avoids the trap.
0 0 12 LW * ?At 12:00, on the last weekday of the monthWhen a month ends on a weekend, LW backs up to that Friday — never into the next month.
Every example on this page is executed against the same engine that powers the tool, on every build.
Gotchas worth knowing
? — one day field must stand down
Day-of-month and day-of-week compete, so exactly one must be ?. Values in both, or ? in both, are refused with the fix named.
L alone, and nL in day-of-week
In day-of-month, L is the month's final day; in day-of-week it takes a prefix — 6L is the last Friday. February shortens both to the 28th or 29th.
L-n counts back from month end
L-3 fires three days before the month's last day, moving with month length. Offsets run 1–30; nothing larger exists in any month.
W and LW never leave the month
15W is the weekday nearest the 15th, clamped inside the month: 1W in a month opening on Saturday fires Monday the 3rd. LW is the month's last weekday.
n#m — the m-th weekday of the month
6#3 is the third Friday. No month holds six of one weekday, so #6 is refused; a #5 the month lacks is skipped, never shifted.
Weekdays run 1 = SUN through 7 = SAT
Crontabs count 0–7 with both ends Sunday; Quartz counts 1–7 from Sunday. A 0 in day-of-week is rejected with the correction; names dodge the ambiguity.
The year field spans 1970–2099
The optional seventh field pins a schedule to years inside 1970–2099; omitted, it recurs every year. Past-only years parse but yield no upcoming fires.
Numeric weekdays flip meaning on the CLI
The cronstrue CLI reads weekday digits classic-style — no Quartz-numbering switch — so 6 becomes Saturday in a terminal. Use names like MON-FRI on the command line.
Common errors
Quartz requires ? in day-of-month or day-of-week — both cannot carry values: change one to ?.- Star in both day fields looks like every day, but Quartz treats them as rivals and declines to guess — values in one, ? in the other.
This is a classic 5-field crontab expression, not Quartz — Quartz needs 6 or 7 fields with seconds first.- Five fields is the crontab shape. The banner offers the Cron Expression Parser, which speaks that dialect; your input travels unchanged.
0 means Sunday in classic cron; Quartz counts 1=SUN…7=SAT — use 1, or open the classic parser.- A leading zero is a crontab habit; Quartz starts at 1 = SUN. The fix is one digit, or a name that reads the same everywhere.
# takes an occurrence from 1 to 5 — no month has a 6th of any weekday.- Five is the ceiling for any weekday in one month. For the final occurrence whatever its count, 6L states exactly that.
Year 2100 is out of range — Quartz accepts 1970 to 2099.- 2099 is Quartz's documented ceiling. Drop the field to recur every year, or pick a year inside 1970–2099.
Input is larger than the 1,024 character limit for this tool. For a quick description use the CLI: npx cronstrue "0 0 12 L * ?"- Past the cap the input is declined whole, never half-parsed. Quartz expressions are short; pipe long lists through the CLI.
FAQ
Why does Quartz require a question mark?
Because two day constraints could contradict and Quartz refuses to arbitrate. Exactly one field carries values; the other yields with ?. Classic cron quietly ORs the two instead.
Is 1 Sunday or Monday here?
Sunday. Quartz numbers weekdays 1 = SUN through 7 = SAT; crontabs start at 0. One digit can mean two days depending on dialect, so the token legend stays pinned on screen beside the results.
What do the seconds and year fields add?
The seconds field schedules below the minute — 0/20 fires three times each minute — and the year field bounds a schedule to 1970–2099 for end-dated jobs. Five-field crontab lines have neither; that dialect lives on the Cron Expression Parser page.
Keyboard shortcuts
- ⌘/Ctrl + Enter
- Re-run the parse and the fire-time table.
- ⌘/Ctrl + S
- Download the expression, description and fires as .txt.
- ⌘/Ctrl + C
- With nothing selected, copy the expression; a selection still copies itself.
- ⌘/Ctrl + Shift + C
- Force-copy the expression, selection or not.
- t
- Cycle the theme — ignored while you are typing.
- ? or ⌘/Ctrl + /
- Show this page's shortcut reference.
- Esc
- Dismiss the topmost dialog; focus lands back on its opener.