Cron tools › Convert
Cron to Quartz
Paste a Linux crontab schedule and get the Quartz expression that fires at the same times — with the seconds field added, the "?" in the right day field and the day of week renumbered. The result is parsed back as Quartz and its next 500 runs are compared with the original.
Quartz expression
Field by field
Code
Try one
How to convert cron to Quartz
- Paste the five schedule fields of your crontab line (minute, hour, day of month, month, day of week) — leave the command off.
- Read the Quartz expression. It updates as you type; there is no Convert button.
- Check the green line: the Quartz expression was parsed back and its next 500 runs match the cron line's, time for time.
- If the page shows two triggers, register both for the same job. That happens when cron's day-of-month and day-of-week are both set.
- Untick names if your codebase prefers numbers (Quartz then writes Monday as 2), and tick the year option if your team always writes seven fields.
The three changes
| What | Unix cron | Quartz | Example |
|---|---|---|---|
| Seconds | no seconds field | first of 6 or 7 fields | 0 9 * * * → 0 0 9 * * ? |
| "?" in a day field | not allowed | exactly one of day-of-month / day-of-week must be "?" | * * 1-5 → ? * MON-FRI |
| Day-of-week numbers | 0-7, 0 and 7 = Sunday | 1-7, 1 = Sunday … 7 = Saturday | 1-5 → 2-6 (or MON-FRI) |
| Year | none | optional 7th field, 1970-2199 | 0 0 9 * * ? 2027 |
| Steps | */15 | same meaning; this page writes 0/15 | */15 → 0/15 |
Copying 1-5 across unchanged is the classic mistake: in Quartz it means Sunday to Thursday. Writing
MON-FRI avoids the numbering question altogether, which is why names are the default here.
When one Quartz expression is not enough
Linux cron has a rule most people meet by accident: when both day fields are restricted, the job runs when
either matches. 0 0 1 * 1 runs on the 1st of every month and on every Monday. Quartz does not
support setting both day fields ("Support for specifying both a day-of-week AND a day-of-month parameter is not
implemented"), so that schedule becomes two triggers — 0 0 0 1 * ? and 0 0 0 ? * MON — attached
to the same job.
The opposite case exists too. A day field that starts with *, such as */2, switches Linux cron to
AND: 0 0 */2 * 1 means "Mondays that fall on an odd date". No Quartz expression can say that, so the page
gives a weekday trigger plus a two-line date check for the start of the job, and verifies that the pair still
produces exactly the cron line's runs. The cron validator shows how each dialect reads a line.
FAQ
Why does Quartz need a question mark?
"?" means "no specific value". Quartz requires it in exactly one of the two day fields because it does not
implement restricting both at once. If you want every day, put * in day-of-month and ? in
day-of-week, which is what 0 0 9 * * ? does.
Is Sunday 0 or 1 in Quartz?
1. Quartz numbers the week 1 = SUN to 7 = SAT, like AWS EventBridge and Cloudflare Workers. Linux cron uses 0-7 with both 0 and 7 meaning Sunday. Names (SUN-SAT) mean the same thing in both, so they are the safer spelling.
Do I have to write the year?
No. The year is an optional seventh field in Quartz; leaving it out means every year. AWS EventBridge is the one that insists on six fields including the year — use the AWS cron tool for that.
Is this the same format Spring's @Scheduled uses?
Close, but not the same. Spring's CronExpression takes exactly six fields (no year), numbers the week 0-7 with Sunday as 0 or 7, treats "?" as "*", and ANDs the two day fields. The Spring cron page converts to that format.
What happens to @reboot and the other macros?
Macros such as @daily or @hourly are expanded first (@daily is 0 0 * * *) and
then converted. Quartz has no macros and no equivalent of @reboot, which is not a clock schedule.