Five fields vs six fields
Unix cron uses minute hour day-of-month month day-of-week. Spring adds a leading seconds field. A crontab line "0 9 * * 1-5" therefore means something completely different in Spring: it is rejected because it only has five fields.
Unix: 0 9 * * 1-5 Spring: 0 0 9 ? * 1-5
Day fields: OR vs AND
In Unix cron, if both day-of-month and day-of-week are restricted, a date matching either one triggers the job. In Spring both fields must match.
This is the classic "it ran on the wrong day" bug: "0 0 9 1 * MON" in Spring means the 1st AND a Monday, not the 1st OR any Monday.
L, W and # are Spring/Quartz only
Unix cron has no concept of "last day of month" or "first Monday". Spring supports L, LW, <n>W and <dow>#<n> because it follows the Quartz day syntax.
Last day of the month: Spring: 0 0 0 L * * Unix: not expressible — use 0 0 28-31 * * with a runtime guard
Converting safely
Conversion is lossless only when the seconds field is 0 and no Spring/Quartz-only day construct is used. If the seconds field is non-zero, or the expression uses L, W or #, no Unix equivalent exists and the schedule has to change.
Use the converter to see exactly which of the two cases you are in.
Summary table
Everything that differs, in one place. Spring is the right-hand column.
| Difference | Unix cron | Spring |
|---|---|---|
| Field count | 5 | 6 (seconds first) |
| Hour range | 0-23 | 0-23 |
| Day-of-week numbers | 0-7, 0 = Sunday | 0-7, 0 and 7 = Sunday |
| Both day fields restricted | OR — either may match | AND — both must match |
| L / LW / W / # | not supported | supported |
| Macros | @daily, @hourly | @daily, @hourly |