Spring @Scheduled 6-Field Cron Tester

Spring Framework 5.3+ / Spring Boot 3 validator · Seconds-first · No 7th Year field

UTC + Local
Valid
6 fields (sec min hr dom mon dow). Sunday = 0 or 7. Supports "?" in DOM/DOW and Spring 5.3+ macros.
Presets:
Interactive Field Editors (Live Sync)
Next 10 Execution Runs (UTC & Local)
#UTC TimeLocal TimeIn
Cross-Dialect Translator (1-Click Copy) Auto-converts DOW & ?
Valid expression
10 runs simulatedCmd/Ctrl+Enter
Advertisement
Reserved fixed-height slot (CLS = 0.00) 728×90 320×100 300×50

Spring Boot @Scheduled Cron vs. Quartz: Key Differences

Spring Framework 5.3 replaced legacy CronSequenceGenerator with org.springframework.scheduling.support.CronExpression, aligning Spring’s 6-field parser with L, W, and # calendar modifiers while keeping POSIX day-of-week numbering (0 or 7 = Sunday). Unlike Quartz, Spring does not accept a 7th Year field and allows * in both day-of-month and day-of-week without throwing an exception.

Always pair @Scheduled(cron = "...", zone = "UTC") with an explicit IANA zone string so container locale differences between developer laptops and Linux production images never shift billing or report batches.

  • Exact 6 Fieldssecond · minute · hour · day-of-month · month · day-of-week (Spring rejects 5-field POSIX and 7-field Year expressions).
  • Spring 5.3+ FeaturesSupports L, W, # modifiers, ? alias for *, macros (@hourly, @daily, @weekly, @monthly), and "-" to disable a scheduled job.
  • Day Numbering0 and 7 both equal Sunday (POSIX-aligned), unlike Quartz where 1 = Sunday. Use MON–SUN names for clarity.
How do I disable a Spring @Scheduled cron job via application.yml without removing the annotation?

Spring 5.1+ recognizes the special cron value "-" (e.g., app.job.cron: "-") to disable the scheduled task cleanly per environment.

Why does day-of-week 1 mean Monday in Spring but Sunday in Quartz?

Spring follows POSIX numbering (0/7 = Sunday, 1 = Monday..6 = Saturday), while Quartz and AWS EventBridge use 1 = Sunday..7 = Saturday. Using MON-FRI works identically in both.