converter · 03
Spring to Quartz Cron Converter
Moving from Spring to Quartz means renumbering numeric weekdays and expanding macros. The converter only claims success where the result really means the same thing.
second · minute · hour · day-of-month · month · day-of-week
Valid Spring cron
quartz cron
0 0 9 ? * 2-6before you use this
- Numeric days of the week were renumbered: Spring uses 0-7 (SUN=0), Quartz uses 1-7 (SUN=1).
nextRelated
Questions
Is a converted Spring expression always usable in Quartz?
- Not always. Numeric days have to be renumbered, * in day-of-week becomes ? when day-of-month is restricted, and Spring macros such as @daily have no Quartz equivalent.
What happens to Spring macros?
- They are expanded: @weekly becomes "0 0 0 ? * MON *" and @daily becomes "0 0 0 ? * * *", because Quartz does not support the @daily family.
Does Quartz accept ? in the day-of-month field?
- Yes, ? is valid in both day fields in Quartz and Spring. Spring treats it exactly like * when parsing.