Cron Expression Explainer
Paste an expression to get a plain-English explanation, the next run times and crontab / Spring / Quartz conversions.
Next run times
Convert to other syntaxes
Ready-to-use config
Cron field reference
| # | Field | Allowed values | crontab | Spring | Quartz |
|---|---|---|---|---|---|
| - | Second | 0-59 | none | 1st | 1st |
| 1 | Minute | 0-59 | 1st | 2nd | 2nd |
| 2 | Hour | 0-23 | 2nd | 3rd | 3rd |
| 3 | Day of month | 1-31 | 3rd | 4th | 4th |
| 4 | Month | 1-12 or JAN-DEC | 4th | 5th | 5th |
| 5 | Day of week | SUN-SAT | 0-7 (0, 7 = Sun) | 0-7 (0, 7 = Sun) | 1-7 (1 = Sun) |
| - | Year | 1970-2099 | none | none | 7th (optional) |
Special characters
| Char | Meaning | Example | Supported in |
|---|---|---|---|
* | Any value | * * * * * every minute | All |
, | List | 0 9,18 * * * at 9 and 18 | All |
- | Range | 0 9 * * 1-5 Mon-Fri | All |
/ | Step | */15 * * * * every 15 min | All |
? | No specific value (day fields) | 0 0 9 ? * MON | Spring, Quartz |
L | Last (day of month, last X weekday) | 0 0 0 L * * last day | Spring, Quartz |
W | Nearest weekday | 0 0 9 15W * ? | Spring, Quartz |
# | Nth weekday of the month | 0 0 9 ? * MON#2 2nd Monday | Spring, Quartz |
Common cron examples
Frequently asked questions
How is Spring cron different from Linux crontab?
Spring has a leading seconds field, so it has 6 fields (second minute hour day month weekday); crontab has 5 (minute hour day month weekday). Also, when both day-of-month and day-of-week are set, crontab runs when either matches (OR), while Spring requires both (AND).
What day is 1 in Quartz?
In Quartz, 1 = Sunday, 2 = Monday … 7 = Saturday. crontab and Spring use 0 (or 7) = Sunday and 1 = Monday. The same "1-5" means Sunday to Thursday in Quartz, so weekday names like MON-FRI are safer.
Why does Quartz need "?"?
Quartz cannot set day-of-month (4th field) and day-of-week (6th field) at the same time, so the unused one must be "?". Every day at 9: 0 0 9 * * ?. Weekdays at 9: 0 0 9 ? * MON-FRI.
How do I run on the last day of the month?
Spring and Quartz accept L in the day-of-month field (for example 0 0 0 L * *). crontab has no L, so run on days 28-31 and check inside the script whether tomorrow is the 1st.
Why does my GitHub Actions schedule run at the wrong hour?
GitHub Actions schedules always use UTC. Convert your local time to UTC before writing the cron expression.