Cron expression: 6 fields vs 5 fields
The same-looking cron string can mean different things depending on the scheduler. Five-field Unix cron starts at minutes; many six-field formats add either a leading seconds field (Quartz, Spring) or a trailing year field (AWS).
Open the tool, then paste the sample input below. Everything runs locally in your browser.
The problem
Counting fields is not enough — you must know the scheduler. A six-field expression in Spring/Quartz puts seconds first. In AWS EventBridge the sixth field is year and there is no seconds field. Run the wrong dialect and the job fires at the wrong time or is rejected.
Sample input
0 9 * * MON
0 0 9 * * MON
0 9 ? * MON *
Expected output
Unix: 09:00 every Monday
Quartz: 09:00:00 every Monday (first field = seconds)
AWS: 09:00 UTC every Monday (last field = year)
Same intent, three dialects. The position of seconds and year is what changes.
How to do it
- Identify the target scheduler (Unix cron, Quartz/Spring, AWS EventBridge, etc.).
- Count the fields.
- Check whether the first field is seconds or minutes.
- Check whether the last field is the year.
- Validate the expression against that scheduler's rules and review the next run times.
Common mistakes
- Assuming every six-field cron means the same thing.
- Mixing Quartz and AWS formats.
- Forgetting the leading seconds field in Spring/Quartz.
- Forgetting the trailing year field in AWS.
- Using
?in standard Unix cron, which does not support it.
Related tools
Related guides
FAQ
Why does my cron expression have 6 fields?
Because the scheduler adds a field Unix cron does not. Quartz and Spring add a leading seconds field; AWS EventBridge adds a trailing year field.
Is the first field seconds or minutes?
In five-field Unix cron it is minutes. In six-field Quartz/Spring expressions the first field is seconds and the second is minutes.
Is AWS cron the same as Quartz cron?
No. AWS uses minutes-first with a trailing year and requires ? in one day field. Quartz is seconds-first and has different special characters.
Can Unix cron use ?
No. The ? character is a Quartz/AWS convention. Standard Unix cron uses * and explicit values only.
How do I convert 5-field cron to 6-field cron?
For Quartz/Spring, prepend a seconds field (often 0). For AWS, append a year field (often *) and replace one day field with ?.
Inspect any cron dialect locally in your browser. Expressions are never uploaded.