Common Cron Syntax Errors & Solutions
If your scheduled task fails to register or executes at unexpected intervals, check for these frequent issues:
Problem: Standard Linux crontab expects 5 fields (min hr dom mon dow). Spring Boot expects 6 fields (sec min hr dom mon dow), and Quartz supports 6 or 7 fields. Pasting a 6-field Spring expression into Linux crontab causes an immediate parse failure.
Problem: Minutes only accept 0–59 (not 60), hours only accept 0–23 (not 24), days of month only accept 1–31 (not 0), and months only accept 1–12. Numbers outside these bounds trigger crontab load errors.
Problem: In Linux crontab, Sunday is represented by both 0 and 7. In Quartz Scheduler, 1 is Sunday and 7 is Saturday. Using 1 for Monday in Quartz runs your job on Sunday instead!
Problem: A step requires an asterisk or range before the slash (e.g. */15 or 0-30/5). Writing /15 without a base is invalid in POSIX cron. Step values must also be positive integers greater than 0.
Problem: Forgetting the minute field when creating an hourly job (e.g. typing * 2 * * * instead of 0 2 * * *) causes the job to run every single minute between 2:00 AM and 2:59 AM (60 times) instead of once.
Problem: Standard Linux crontab evaluates against the local system clock (e.g. UTC on cloud VPS). If your development machine is in EST and your server is UTC, a schedule set for 9:00 AM will fire at 4:00 AM EST. On Linux, set CRON_TZ=America/New_York at the top of your crontab.