Cron error messages, explained
The exact messages Quartz, Kubernetes CronJobs and Azure Functions print when they reject a schedule, what each one means and the expression that fixes it. The Quartz and Kubernetes messages were produced by running every expression on these pages through Quartz 2.5.2 and robfig/cron v3.0.1, the parser Kubernetes uses.
Quartz
- Support for specifying both a day-of-week AND a day-of-month parameter is not implemented.Quartz: Both day fields are set
- Unexpected end of expression.Quartz: Five fields instead of six
- '?' can only be specified for Day-of-Month -OR- Day-of-Week.Quartz:
?in the wrong place - Day-of-Week values must be between 1 and 7Quartz: Sunday written as 0
- Hour values must be between 0 and 23Quartz: A value out of range
- Increment >= 60 : 90Quartz: A step longer than the field
- Unexpected character: @Quartz:
@dailyand other shortcuts
Kubernetes
- expected exactly 5 fields, found 6: [0 0 12 * * ?]Kubernetes: Six or seven fields
- end of range (7) above maximum (6): 7Kubernetes: Sunday written as 7
- beginning of range (0) below minimum (1): 0Kubernetes: Day or month written as 0
- beginning of range (22) beyond end of range (2): 22-2Kubernetes: A range that wraps around
- failed to parse int from L: strconv.Atoi: parsing "L": invalid syntaxKubernetes:
L,#,WorH - cannot use TZ or CRON_TZ in schedule, use timeZone field insteadKubernetes:
TZ=orCRON_TZ=in the schedule