Quartz to Cron Converter
Convert a Java Quartz cron expression (6–7 fields) into a Linux crontab expression (5 fields). The converter drops the seconds and year fields, renumbers day-of-week, turns ? into *, approximates L, W and # honestly — and warns you whenever the result is not exact.
Converter
Batch mode
Convert many expressions at once — one Quartz expression per line.
Worked examples
Click any example to load it into the converter.
| Quartz (6/7-field) | Linux cron (5-field) | Meaning |
|---|---|---|
| 0 0 9 ? * MON-FRI | 0 9 * * 1-5 | Weekdays at 9:00 AM (days renumbered 2–6 → 1–5) |
| 0 */15 * * * ? | */15 * * * * | Every 15 minutes (steps carry over, seconds 0 is exact) |
| 0 30 2 ? * 1 | 30 2 * * 0 | Sundays at 2:30 AM (Quartz 1 → Linux 0) |
| 0 0 0 1 * ? | 0 0 1 * * | 1st of every month at midnight |
| 0 0 12 L * ? | 0 12 28,29,30,31 * * | Last day of month → approximation (warning shown) |
| 0 0 8 ? * 6#3 | 0 8 * * 5 | 3rd Friday → every Friday (approximation, warning shown) |
| 30 0 0 ? * * 2026 | 0 0 * * * | Seconds + year dropped (warnings shown) |
| 0 0 9 15W * ? | 0 9 15 * * | Nearest weekday to the 15th → the 15th (approximation, warning shown) |
7-field vs 5-field: what changes
| # | Quartz field | Linux cron field | What the converter does |
|---|---|---|---|
| 1 | seconds (0–59) | — | Dropped. Exact only when it is 0; anything else triggers a warning (or an error in strict mode). |
| 2 | minute (0–59) | minute | Copied unchanged, including */n steps, ranges and lists. |
| 3 | hour (0–23) | hour | Copied unchanged. |
| 4 | day-of-month (1–31) | day-of-month | ? becomes *. L/LW/L-n → 28,29,30,31 (approximation). 15W → 15 (approximation). |
| 5 | month (1–12) | month | Copied unchanged (names JAN–DEC accepted by both). |
| 6 | day-of-week (1–7) | day-of-week (0–6) | Renumbered: Quartz 1=Sunday → Linux 0=Sunday. ? → *. L alone = Saturday → 6 (exact). 6L/6#3 → 5 (approximation). |
| 7 | year (optional) | — | Dropped. * loses nothing; a restricted year triggers a warning because the schedule will repeat yearly. |
The seconds problem
Linux cron fires at most once per minute, always at second 0. A Quartz expression with seconds 0 converts exactly. Anything else changes the schedule: 30 fires 30 seconds early under Linux cron, and */15 (four runs per minute in Quartz) collapses to a single run per minute. The converter warns you every time — or refuses outright in strict mode.
L, W and # have no Linux equivalent
Linux cron simply cannot say “last day of the month”, “nearest weekday” or “3rd Friday”. Rather than failing silently, the converter substitutes the closest recurring pattern and labels it:
| Quartz | Linux approximation | What is lost |
|---|---|---|
| L, LW, L-3 | 28,29,30,31 | Fires on up to four days instead of exactly the last day |
| 15W | 15 | The weekend shift Quartz applies is lost |
| 6#3, FRIL, 6L | 5 | Fires every Friday instead of once a month |
| L (day-of-week) | 6 | Nothing — Quartz L in day-of-week means Saturday, exact |
The ? rule
In Quartz, ? in day-of-month or day-of-week means “no specific value” — exactly one of the two day fields must be ? when the other is restricted. Linux cron has no ?, so it becomes *: 0 0 9 ? * MON-FRI becomes 0 9 * * 1-5.
Sunday numbering
Quartz: Sunday = 1, Saturday = 7. Linux: Sunday = 0 (or 7), Saturday = 6. Every numeric day-of-week value is shifted down by one; day names (SUN–SAT) are identical in both dialects and pass through untouched.
Frequently asked questions
Free tool by NRTechStudio