Cron Expression Generator & Explainer
Paste a cron expression to read it in plain English and see when it runs next, in your time zone or any other. Or build one below without remembering the syntax. Everything runs in your browser.
Next run times
- The next run times appear here.
Build an expression
| Field | Value | Meaning | Allowed |
|---|
How to use this cron tool
- Paste or type a cron expression, for example
*/15 * * * *. You can also paste a whole crontab line with the command after it, a macro such as@daily, or an AWScron(…)expression. - Read the explanation. The blue box says in plain English when the job runs. Below it, each field is shown on its own, and notes point out common traps, such as the day-of-month / day-of-week rule.
- Check the next run times. Choose your own time zone, UTC (GitHub Actions) or the time zone of your server, and see the next 5 to 50 runs with how far away they are.
- Build one with the form if you do not know the syntax: every N minutes, every N hours, every day, on chosen weekdays, monthly or yearly.
- Use it in… turns the schedule into ready code for crontab, GitHub Actions, Kubernetes, Spring, Quartz or AWS EventBridge, and warns when that platform cannot express it.
The tool understands 5-field standard cron, 6-field Spring expressions with seconds, Quartz (6 or 7 fields, with ?) and AWS EventBridge. Auto-detect picks the format from the number of fields and where the ? is; you can change it with Read as.
Cron syntax
A standard cron expression has five fields, separated by spaces:
┌───────────── minute (0–59) │ ┌─────────── hour (0–23) │ │ ┌───────── day of the month (1–31) │ │ │ ┌─────── month (1–12 or JAN–DEC) │ │ │ │ ┌───── day of the week (0–7 or SUN–SAT; 0 and 7 are Sunday) │ │ │ │ │ * * * * * command to run
Special characters
| Character | Meaning | Example |
|---|---|---|
* | Every value of the field | * * * * * = every minute |
, | A list of values | 0,30 in minutes = at :00 and :30 |
- | A range (both ends included) | 1-5 in day of week = Monday to Friday |
/ | A step: every Nth value | */10 in minutes = 0, 10, 20 … 50 |
? | No specific value (Quartz, AWS: one day field must be ?) | 0 0 12 ? * MON |
L | Last: last day of the month, or the last given weekday of the month | L in day of month; 5L = last Friday |
W | The weekday (Mon–Fri) nearest to a day of the month | 15W; LW = last weekday of the month |
# | The Nth given weekday of the month | 1#1 = first Monday (Quartz/AWS: 2#1) |
L, W and # work in Spring, Quartz and AWS, but not in standard Linux crontab, GitHub Actions or Kubernetes.
Macros
| Macro | Same as | Meaning |
|---|---|---|
@yearly, @annually | 0 0 1 1 * | Once a year, at midnight on 1 January |
@monthly | 0 0 1 * * | At midnight on the first day of every month |
@weekly | 0 0 * * 0 | At midnight every Sunday |
@daily, @midnight | 0 0 * * * | Every day at midnight |
@hourly | 0 * * * * | At the start of every hour |
@reboot | — | Once, when the system starts (crontab only) |
Common cron expressions
Click an expression to load it into the tool above and see its next run times.
| Expression | Runs |
|---|---|
* * * * * | Every minute |
*/5 * * * * | Every 5 minutes |
*/15 * * * * | Every 15 minutes |
*/30 * * * * | Every 30 minutes |
0 * * * * | Every hour, on the hour |
0 */2 * * * | Every 2 hours |
0 */6 * * * | Every 6 hours (00:00, 06:00, 12:00, 18:00) |
0 0 * * * | Every day at midnight |
0 9 * * * | Every day at 09:00 |
0 8,20 * * * | Twice a day, at 08:00 and 20:00 |
0 9 * * 1-5 | Monday to Friday at 09:00 |
*/10 9-17 * * 1-5 | Every 10 minutes during working hours on weekdays |
0 10 * * 0,6 | Saturday and Sunday at 10:00 |
0 0 * * 0 | Every Sunday at midnight (once a week) |
0 0 1 * * | At midnight on the first day of every month |
0 0 1,15 * * | On the 1st and the 15th of every month |
0 0 1 */3 * | Every quarter: 1 January, April, July and October |
0 0 1 1 * | Once a year, on 1 January |
0 0 L * * | Last day of every month (Spring, Quartz, AWS; not crontab) |
0 17 * * 5L | Last Friday of the month at 17:00 (not crontab) |
Cron in different tools
The idea is the same everywhere, but the details are not. These differences cause most surprises:
| Where | Fields | Time zone | Watch out for |
|---|---|---|---|
| Linux crontab (cronie, Vixie cron) | 5: m h dom mon dow | Server time; CRON_TZ= line in many versions | A % in the command means a new line, so write \%. Cron has a small PATH: use full paths. |
| GitHub Actions | 5 | Always UTC | Shortest interval is 5 minutes. Runs can start late when GitHub is busy. |
| Kubernetes CronJob | 5 | spec.timeZone (Kubernetes 1.27+) | Set concurrencyPolicy if one run may still be busy when the next starts. |
Spring @Scheduled | 6: s m h dom mon dow | zone attribute | Both day fields must match (no either-or rule). Supports L, W, #. |
| Quartz | 6–7: seconds first, optional year | inTimeZone(…) | Day of week is 1–7 starting on Sunday. One day field must be ?. |
| AWS EventBridge | 6: m h dom mon dow year | UTC for rules; Scheduler has a time zone setting | Written as cron(…). Day of week 1–7 = SUN–SAT. One day field must be ?. |
| systemd timers | Own format: OnCalendar=Mon..Fri 09:00 | Local, or a zone after the time | Not cron syntax. Test with systemd-analyze calendar "…". |
Frequently asked questions
What is a cron expression?
A cron expression is a short text that describes a repeating schedule. Standard cron uses five fields separated by spaces: minute, hour, day of the month, month and day of the week. For example 0 9 * * 1-5 means at 09:00, Monday through Friday. A * means every value, so * * * * * runs every minute.
What does */5 mean in cron?
The slash sets a step. */5 in the minute field means every 5th minute starting at 0: minutes 0, 5, 10 and so on up to 55. 10-30/5 means every 5th minute from 10 through 30. A step counts from the start of the range, so */7 in the minute field runs at minutes 0, 7, 14 … 56 and then again at 0, which is only 4 minutes later.
Why does my cron job run on more days than I expected?
When both day of the month and day of the week are set (neither is *), standard cron runs the job when EITHER of them matches. So 0 9 1-7 * 1 runs on days 1 to 7 of every month and also on every Monday, not only on the first Monday. Spring, Quartz and AWS work differently: Quartz and AWS need a ? in one of the two fields.
How do I run a cron job on the first Monday or the last Friday of the month?
In Spring, Quartz and AWS write the day of the week with # or L: MON#1 (Quartz and AWS: 2#1) is the first Monday and FRIL (Quartz and AWS: 6L) is the last Friday. Standard crontab has no such syntax. There, run the job on days 1 to 7 and test the weekday in the command: 0 9 1-7 * * [ "$(date +\%u)" = 1 ] && /path/to/job. The % must be escaped as \% inside a crontab.
Which time zone does cron use?
Classic cron uses the time zone of the server. Many versions accept a CRON_TZ=Europe/Berlin line in the crontab. GitHub Actions schedules always run in UTC. Kubernetes CronJobs use the time zone of the controller unless you set spec.timeZone. Spring takes a zone attribute, and AWS EventBridge Scheduler has its own time zone setting. This page shows the next run times in any time zone you choose.
What is the difference between 5, 6 and 7 field cron expressions?
Five fields (minute hour day month weekday) is the standard used by crontab, GitHub Actions and Kubernetes. Spring adds a seconds field at the start, so it has six. Quartz also starts with seconds and can add a year at the end (six or seven fields), and counts the days of the week from 1 = Sunday instead of 0 = Sunday. AWS EventBridge has six fields without seconds but with a year at the end.
Can cron run a job every 30 seconds?
Not with standard crontab: the smallest unit is one minute. A common trick is two lines, * * * * * /path/to/job and * * * * * sleep 30; /path/to/job. A systemd timer (OnCalendar=*:*:0/30) or a scheduler with a seconds field, such as Spring (*/30 * * * * *) or Quartz (0/30 * * * * ?), can do it directly.