Cron Expression Builder and Explainer
Build a cron expression or read one in plain English.
About this tool
Pick how often a job should run to build a cron expression, or type one to get a plain-English description, a breakdown of each field, and the next times it will run in your time zone. Supports ranges, lists, steps, month and day names, and shortcuts like @daily.
How to use it
- To read an expression, paste it in Explain mode and see it in plain English.
- To create one, switch to Build mode and choose how often the job should run.
- Check the next run times, shown in your own time zone.
- Copy the expression into your crontab, CI config or scheduler.
Questions
- What do the five fields mean?
- In order: minute (0–59), hour (0–23), day of month (1–31), month (1–12) and day of week (0–6, Sunday is 0 or 7). A * means every value.
- How do I run a job every 5 minutes?
- Use */5 * * * *. The /5 is a step, meaning every fifth value of that field starting from 0.
- What if I set both day of month and day of week?
- In classic cron the job runs when either one matches, not both. So 0 9 1 * MON runs at 9:00 on the 1st of every month and on every Monday.
- Which time zone does cron use?
- The time zone of the machine or service running it, which is often UTC on servers and in CI. The next runs here are shown in your local time, so convert if your server uses UTC.
- How do I run a cron job every 30 seconds?
- Cron can’t: its smallest unit is one minute. A common workaround is two entries, one running the command and one running sleep 30 followed by the command. For anything more precise or frequent, use a systemd timer or a long-running process with its own loop.
- How do I run a job on the last day of the month?
- Standard cron has no L. Schedule the job for days 28-31, such as 0 23 28-31 * *, and start the command with a check that tomorrow is the 1st, for example [ $(date -d tomorrow +\%d) = 01 ] && your-command, which needs GNU date.
- What does @reboot mean in a crontab?
- @reboot runs the command once when the cron daemon starts, usually right after the machine boots. It is supported by cronie and Vixie cron but isn’t a time schedule, so this tool can’t show next runs for it and reports an error. On systemd machines, a service unit is often the better choice.
Why is my cron job not running?
First check that cron sees the job at all. Run crontab -l as the same user, and make sure the file ends with a newline, because some cron versions ignore a last line without one. Then check the schedule: paste it here and read the next runs. A common surprise is */45 in the minute field, which fires at :00 and :45 every hour, not every 45 minutes.
If the schedule is right, the environment usually isn’t. Cron runs with a minimal PATH and no shell profile, so commands that work in your terminal fail with “command not found”. Use absolute paths, set PATH at the top of the crontab, and send output to a log with >> /tmp/job.log 2>&1 so you can see the errors. Also note that % is special in crontab lines and must be escaped as \%.
Cron syntax explained: ranges, lists, steps and shortcuts
Each field accepts more than a single number. A range like 9-17 matches every value from 9 to 17, a list like 1,15 matches each listed value, and a step like */15 matches every fifteenth value starting from the field’s minimum. They combine: 0-30/10 in the minute field means 0, 10, 20 and 30. Month and weekday fields also accept names such as JAN or MON-FRI.
Shortcuts replace a whole expression: @hourly is 0 * * * *, @daily and @midnight are 0 0 * * *, @weekly is 0 0 * * 0, @monthly is 0 0 1 * *, and @yearly or @annually is 0 0 1 1 *. In the day-of-week field, both 0 and 7 mean Sunday. The Fields table in this cron expression explainer shows which values each field expands to, the quickest way to check a tricky combination.
Crontab vs Kubernetes, GitHub Actions and Quartz cron
The five-field format is shared by Linux crontab, Kubernetes CronJobs and GitHub Actions schedules, so an expression built with this cron generator works in all three. GitHub Actions always uses UTC, runs at most every 5 minutes, and may start scheduled jobs late when it is busy. Kubernetes uses the controller’s time zone unless you set spec.timeZone. None of them support a seconds field.
Quartz, Spring and AWS EventBridge use longer formats. Quartz and Spring add a seconds field at the start, and AWS adds a year field at the end. Quartz and AWS also require ? in one of the two day fields, and all three support extras like L for the last day and # for the nth weekday. Those expressions are rejected here, so drop the extra fields and rewrite L or # by hand.
Common cron expressions
Copy one of these schedules, or paste it into the tool above to see its next run times.
| Expression | Meaning |
|---|---|
* * * * * | Every minute |
*/5 * * * * | Every 5 minutes |
*/15 * * * * | Every 15 minutes |
0 * * * * | Every hour |
0 */6 * * * | On the hour, every 6 hours |
0 0 * * * | At 00:00 |
30 2 * * * | At 02:30 |
0 9 * * 1-5 | At 09:00, Monday through Friday |
0 0 * * 0 | At 00:00, only on Sunday |
0 0 1 * * | At 00:00, on day 1 of the month |
0 0 1 1 * | At 00:00, on day 1 of the month, only in January |
Something not working, or a result looks wrong? Report a problem with this tool