converter · 02
Quartz Cron to Spring Converter
Spring copied the Quartz syntax for L, W and #, but not its weekday numbering. This converter renumbers the days and warns about the Quartz year field.
second · minute · hour · day-of-month · month · day-of-week
Valid Spring cron
spring cron
0 0 9 ? * 1-5before you use this
- This expression looks like spring cron, but the conversion was requested from quartz.
- Numeric days of the week were renumbered: Quartz uses 1-7 (SUN=1), Spring uses 0-7 (SUN=0).
tableWeekday numbering
| Day | Quartz | Spring |
|---|---|---|
| Sunday | 1 | 0 (or 7) |
| Monday | 2 | 1 |
| Tuesday | 3 | 2 |
| Wednesday | 4 | 3 |
| Thursday | 5 | 4 |
| Friday | 6 | 5 |
| Saturday | 7 | 6 |
nextRelated
Questions
What has to change when converting Quartz to Spring?
- Numeric days of the week. Quartz numbers them 1-7 with SUN = 1, Spring uses 0-7 with 0 = Sunday. A Quartz "6L" (last Friday) becomes "5L" in Spring.
Does Spring support the Quartz year field?
- No. Spring has no year field, so a Quartz expression such as "0 0 12 ? * MON-FRI 2025" has to drop the year, which means the Spring schedule runs every year.
Is the rest of the syntax identical?
- Yes. Both use six fields with seconds first, both support L, LW, W and #, both accept ? and both require both day fields to match when both are restricted.