Why Crontab Syntax Is Error-Prone
Standard Unix cron uses 5 fields (minute, hour, day-of-month, month, day-of-week). In contrast, Spring `@Scheduled`, Quartz, and enterprise schedulers expect 6 fields including a leading seconds parameter. Confusing these schemas or misunderstanding weekday numbers frequently causes missed jobs or cascading server overloads.
Linux 5-Field vs Spring 6-Field
- Linux Crontab:
* * * * *(minute 0-59, hour 0-23, day 1-31, month 1-12, weekday 0-7) - Spring:
0 * * * * *(second 0-59, minute 0-59, hour 0-23, day 1-31, month 1-12, weekday 0-7)
Common Cron Wildcards
*:Matches every possible value in that field.*/X:Step intervals. `*/15` in the minute field means every 15 minutes.,:Comma-separated lists of specific values (e.g. `1,3,5`).-:Hyphen-separated continuous ranges (e.g. `9-17`).