Cron Expression Generator
About the Cron Expression Generator
This cron expression generator builds and explains standard 5-field cron schedules, like the ones used by crontab, Kubernetes CronJobs and GitHub Actions. Fill in the builder fields or paste an expression, and you get a plain-English description, instant validation and the next 10 run times in your own time zone.
Cron syntax explained
A cron expression has five fields separated by spaces: minute (0-59), hour (0-23), day of month (1-31), month (1-12 or JAN-DEC) and day of week (0-7 or SUN-SAT, where both 0 and 7 mean Sunday).
Each field accepts * for every value, a single number like 5, a range like 1-5, a list like 1,15, and a step like */15 (every 15th value). Steps work on ranges too: 9-17/2 in the hour field means 9:00, 11:00, 13:00, 15:00 and 17:00.
For example, */15 9-17 * * 1-5 runs every 15 minutes between 09:00 and 17:59, Monday to Friday, and 0 3 1 * * runs at 03:00 on the first day of every month.
Cron macros: @daily, @hourly and friends
Most cron implementations accept shortcuts in place of the five fields. This tool understands @yearly and @annually (0 0 1 1 *), @monthly (0 0 1 * *), @weekly (0 0 * * 0), @daily and @midnight (0 0 * * *), and @hourly (0 * * * *).
@reboot also exists in Vixie cron, but it runs once at startup rather than on a schedule, so it has no next run times to preview.
The day-of-month and day-of-week gotcha
When both day fields are restricted, standard cron runs the job when either one matches, not both. 0 9 13 * 5 fires at 09:00 on the 13th of every month and on every Friday, not only on Friday the 13th.
If one of the two day fields is *, only the other one applies. The description and run-time preview here follow the same rule as Vixie cron, so you can see exactly which days match.
Time zones and platform differences
Cron runs in the time zone of the machine or service that executes it. Linux servers often use UTC, and GitHub Actions schedules always run in UTC. The preview here uses your browser's time zone, so convert if your server differs.
Some schedulers use different formats. Quartz and Spring add a seconds field (six or seven fields) and use ? for "no specific value"; AWS EventBridge adds a year field. This tool validates the classic five-field format, and accepts ? in the two day fields. Quartz extras such as L, W and # are not supported, and a step larger than its field (for example */90 in the minute field) is rejected.
How to Use the Cron Expression Generator
- Pick a Quick Preset, press Load example, or type or paste an expression (macros like @daily work too) into the Expression box. The five builder fields follow along, and you can also edit them one by one.
- Read the Human Readable description and the next 10 run times, shown in your browser's time zone (named in the heading). An error message names the field that is wrong.
- Click the copy button to copy the expression, or Download to save the expression, its description and the next runs as a text file. Clear empties the box.
Cron Expression Generator Examples
Weekdays at 9 AM
Input:
0 9 * * MON-FRI
Output:
At 09:00, on Monday through Friday
Every 15 minutes during office hours
Input:
*/15 9-17 * * 1-5
Output:
Every 15 minutes, between 09:00 and 17:59, on Monday through Friday
Both day fields set (the OR rule)
Runs on the 13th of every month and on every Friday, not only on Friday the 13th.
Input:
0 9 13 * 5
Output:
At 09:00, on the 13th of the month or on Friday
Common Errors
- "Expected 5 fields (minute hour day-of-month month day-of-week), got 6" for an expression copied from Quartz or Spring.
- Those formats start with a seconds field. Drop the leading seconds value (and any trailing year) to get the standard five fields; seconds-level schedules cannot be expressed in standard cron.
- Day of month: "L" is not a valid value or Day of week: "1#2" is not a valid value.
- L, W and # are Quartz extensions and are not supported. Use plain numbers, ranges, lists and steps instead.
- Minute: step 90 is larger than the field range (0-59).
- A step cannot be bigger than the field. For "every 90 minutes" use an hour step such as 0 */2 * * * for every 2 hours, or run it from a scheduler that supports longer intervals.
- Unknown macro "@reboot".
- @reboot runs once at startup and has no schedule, so it cannot be previewed. Use it directly in your crontab instead.
- "Minute: range start 17 is greater than end 9" for a range like 17-9.
- Ranges must go upward and cannot wrap around. Split a wrapping range into a list, e.g. 22-23,0-6 instead of 22-6.
Frequently Asked Questions
- What does */5 mean in cron?
- Every 5th value of that field, starting from its minimum. In the minute field, */5 runs at :00, :05, :10 and so on up to :55.
- How do I run a cron job every weekday?
- Put 1-5 in the day-of-week field. For example, 0 8 * * 1-5 runs at 08:00 Monday through Friday.
- Is Sunday 0 or 7 in cron?
- Both. Standard cron accepts 0 and 7 for Sunday, and this tool treats them the same.
- Can cron run a job every 30 seconds?
- Not with standard cron, whose smallest unit is one minute. Use a systemd timer, a loop inside the job, or a scheduler that supports a seconds field.
- Why does my job run at the wrong hour?
- Usually because the server runs in UTC while you planned in local time. Check the server time zone, or set CRON_TZ or TZ if your cron supports it.