Cron vs. Quartz: which syntax do you need?
| Standard (Unix) cron | Quartz cron | |
|---|---|---|
| Fields | 5: minute hour day month weekday | 6–7: second minute hour day month weekday [year] |
| Used by | crontab, Kubernetes CronJob, GitHub Actions, AWS EventBridge*, Vercel, systemd-like schedulers | Quartz Scheduler, Spring @Scheduled, Jenkins (partially), Salesforce, many Java apps |
| Weekday numbers | 0–6 (Sunday = 0 or 7) | 1–7 (Sunday = 1) |
| Special characters | * , - / | * , - / ? L W # |
* AWS EventBridge uses a 6-field variant with a year field and ?, closer to Quartz.
Spring’s @Scheduled(cron = …) uses 6 fields with seconds first like Quartz, but numbers weekdays 0–7 like Unix — prefer weekday names (MON-FRI) to avoid surprises.