Cron Expression Explainer
Paste a cron expression to see what it means in plain English, how each field is read, and
exactly when it will run next. It reads standard crontab schedules and the Quartz, Spring and
AWS EventBridge dialects, with their seconds and year fields and
?,
L,
W and
#. Everything is calculated in your browser.
Crontabs often reveal job names, paths and schedules, so nothing is uploaded.
minutehourday-of-monthmonthday-of-week
Try an example
What a cron expression is
A cron expression is a compact schedule: five fields separated by spaces that say which minutes, hours, days and months a job should run. The cron daemon checks the schedule every minute and starts any job whose fields all match the current time. Java schedulers and AWS use six- or seven-field variants, covered below.
| Position | Field | Allowed values |
|---|---|---|
| 1 | Minute | 0–59 |
| 2 | Hour | 0–23 |
| 3 | Day of month | 1–31 |
| 4 | Month | 1–12 or JAN–DEC |
| 5 | Day of week | 0–7 or SUN–SAT (0 and 7 are both Sunday) |
Special characters
| Symbol | Meaning | Example |
|---|---|---|
| * | Every value in the field | * * * * * runs every minute |
| , | A list of values | 0,30 * * * * at minute 0 and 30 |
| - | An inclusive range | 0 9-17 * * * every hour from 9 to 17 |
| / | A step through a range | */15 * * * * every 15 minutes |
| JAN, MON… | Names for months and weekdays | 0 0 * JAN-MAR MON Mondays in Q1 |
| @daily… | Shortcuts: @yearly, @monthly, @weekly, @daily, @hourly | @daily same as 0 0 * * * |
Quartz, Spring and AWS only
These work only in the day fields, and only on their own (not in a list). The examples are
Quartz, where Sunday is 1, so 6L is the last Friday;
in Spring the same day is 5L.
| Symbol | Meaning | Example |
|---|---|---|
| ? | No specific value, in day-of-month or day-of-week. Quartz and AWS need it in one of them | 0 0 12 ? * MON Mondays at 12:00 |
| L | Last day of the month | 0 0 0 L * ? at midnight on the last day |
| L-n | n days before the last day (Quartz, Spring) | 0 0 0 L-2 * ? two days before the last |
| nW | Weekday nearest day n, without leaving the month | 0 0 9 15W * ? weekday nearest the 15th |
| LW | Last weekday of the month (Quartz, Spring) | 0 0 9 LW * ? last Monday-Friday |
| dL | Last given weekday of the month | 0 0 18 ? * 6L last Friday at 18:00 |
| d#n | The nth given weekday of the month | 0 0 9 ? * 2#1 first Monday at 09:00 |
Common schedules
| Expression | Runs |
|---|---|
| * * * * * | Every minute |
| 0 * * * * | Every hour, on the hour |
| 0 0 * * * | Every day at midnight |
| 30 2 * * 0 | Sundays at 02:30 |
| 0 9 * * 1-5 | Weekdays at 09:00 |
| 0 0 1 * * | The first of every month |
| 0 0 1 1 * | Once a year, at midnight on 1 January |
| */10 * * * * | Every 10 minutes |
The same schedule in crontab, Quartz, Spring and AWS
Moving a schedule between systems means adding or removing the seconds and year fields, and renumbering the days of the week.
| Runs | Crontab | Quartz | Spring | AWS EventBridge |
|---|---|---|---|---|
| Every 5 minutes | */5 * * * * | 0 */5 * * * ? | 0 */5 * * * * | cron(0/5 * * * ? *) |
| Every hour, on the hour | 0 * * * * | 0 0 * * * ? | 0 0 * * * * | cron(0 * * * ? *) |
| Every day at 12:00 | 0 12 * * * | 0 0 12 * * ? | 0 0 12 * * * | cron(0 12 * * ? *) |
| Weekdays at 09:00 | 0 9 * * 1-5 | 0 0 9 ? * MON-FRI | 0 0 9 * * MON-FRI | cron(0 9 ? * MON-FRI *) |
| Sundays at 03:00 | 0 3 * * 0 | 0 0 3 ? * 1 | 0 0 3 * * 0 | cron(0 3 ? * 1 *) |
| 1st of the month at midnight | 0 0 1 * * | 0 0 0 1 * ? | 0 0 0 1 * * | cron(0 0 1 * ? *) |
| Last day of the month at midnight | not possible | 0 0 0 L * ? | 0 0 0 L * * | cron(0 0 L * ? *) |
| Every 30 seconds | not possible | */30 * * * * ? | */30 * * * * * | not possible |
Gotchas that cause missed and surprise runs
- Day of month and day of week combine with OR.
0 0 13 * 5runs on the 13th and on every Friday, not only on Friday the 13th. It's only an AND when one of the two fields is*. - Steps restart with each cycle.
*/7 * * * *runs at minutes 0, 7, 14 … 56 and then at 0 again, so the last gap in each hour is only 4 minutes. - Time zones. Cron uses the time zone of the machine running it, and containers and cloud schedulers are usually UTC. A job set for 09:00 "local" may run at a different hour than you expect, and twice-a-year daylight-saving shifts can skip or repeat an hour.
- Sunday is 0 and 7, or 1. Both 0 and 7 mean Sunday
in standard cron and Spring, but Quartz and AWS count from Sunday = 1, so
2is Monday there and Tuesday in crontab. Day names (MON) avoid the trap. - Percent signs in crontab commands. An unescaped
%in a crontab command line is treated as a newline, sodate +%Fmust be writtendate +\%F. - Missed runs are not made up. If the machine is off or the daemon is down at the scheduled minute, plain cron simply skips that run.
Cron dialects: crontab, Quartz, Spring and AWS
Several systems use cron-like expressions that look alike but read differently. An expression copied from one to another can run at the wrong time without any error, so this tool works out which dialect it is reading and shows it under the input.
| Dialect | Fields | Days of the week | Day of month and day of week |
|---|---|---|---|
| Standard (crontab, Kubernetes, GitHub Actions) | 5: minute hour day-of-month month day-of-week | 0-7, Sunday is 0 or 7 | Both set: runs when EITHER matches |
| Quartz | 6 or 7: second first, optional year last | 1-7, Sunday is 1 | One of the two must be ? |
| Spring (@Scheduled) | 6: second first | 0-7, Sunday is 0 or 7 (names MON-SUN) | ? is optional. Both set: BOTH must match |
| AWS EventBridge | 6: year last, inside cron( ) | 1-7, Sunday is 1 | One of the two must be ? |
How auto-detect decides. Five fields are standard cron
and seven are Quartz. With six, the position of the
? tells Quartz (fourth or sixth field) from AWS
(third or fifth), and six fields with no
? can only be Spring, since Quartz and AWS require
one. A cron( ) wrapper means AWS. If the guess
is wrong, pick the dialect yourself: the same expression can mean a different day in each.
Not covered: AWS
rate( ) expressions, which run at a fixed interval
rather than on a calendar, and systemd timers, whose
OnCalendar syntax is a different language altogether.
FAQ
How do I run a job every 90 minutes?
One expression can't express it, because cron steps restart each hour or day. Use two lines: 0 0-23/3 * * * (at :00 every third hour) and 30 1-23/3 * * * (at :30 in the hours between).
How do I run a job on the last day of the month?
Quartz, Spring and AWS have L for it, as in 0 0 0 L * ?. Standard cron has no "last day" symbol. A common workaround is to run on days 28–31 and let
the command check whether tomorrow is the 1st, for example
[ "$(date -d tomorrow +\%d)" = 01 ] && run-job
with GNU date.
Why did my job not run when this tool says it should?
Check the machine's time zone first, then that the cron daemon is running, then that the
command works with cron's minimal environment (a short PATH, no shell profile). Cron reports failures by mail or in the system log, not on screen.
Can cron run every few seconds?
Not standard cron or AWS: their smallest unit is one minute. Quartz and Spring have a seconds
field, so */10 * * * * ? runs every 10 seconds.
Otherwise, run a long-lived process or a job that loops with a sleep.
Related tools
- Timestamp Converter — Unix timestamps to readable dates and back, in UTC and your local time.
- chmod Calculator — Convert 755 ↔ rwxr-xr-x and see exactly who can do what.
- Format Identifier — Paste anything to find out what it is (a JWT, JSON, a certificate, Base64, a cron schedule and more), then open it in the right tool.