Build and explain a schedule
Month and weekday names work too: JAN to DEC, SUN to SAT. In the day of week field, 0 and 7 both mean Sunday. Edit either the expression or the five fields; the other side follows.
Plain English
Runs at 09:00 on Monday, Tuesday, Wednesday, Thursday, and Friday of every month.
Field breakdown
| Field | Value | Range | Meaning |
|---|
Next 10 runs
| # | Run time | From now |
|---|
Same schedule in other dialects
0 0 9 ? * MON-FRI
cron(0 9 ? * MON-FRI *)
Crontab line
GitHub Actions snippet
GitHub Actions schedules always run in UTC, and the shortest interval is once every 5 minutes. If the timezone above is not UTC, convert the hours before pasting.
How to read a cron expression
A cron expression has five fields, separated by spaces, read left to right. Each field narrows the schedule. The command comes after the five fields in a crontab line; the expression itself only sets the timing.
| Position | Field | Values | Names | What it sets |
|---|---|---|---|---|
| 1 | Minute | 0-59 | n/a | The minute within the hour. |
| 2 | Hour | 0-23 | n/a | The hour of the day, 24 hour clock. 0 is midnight. |
| 3 | Day of month | 1-31 | n/a | The date within the month. |
| 4 | Month | 1-12 | JAN-DEC | The month of the year. |
| 5 | Day of week | 0-7 | SUN-SAT | The weekday. 0 and 7 both mean Sunday. |
Each field accepts four kinds of pattern. They combine with commas, so 0,30 9,17 * * * runs at 09:00, 09:30, 17:00, and 17:30.
| Pattern | Example | Meaning |
|---|---|---|
| Asterisk | * | Every value in the field. |
| List | 1,15 | Only the listed values. |
| Range | 9-17 | Every value from the first to the last, both included. |
| Step | */15 or 0-30/5 | Every nth value, counting from the start of the range. */15 in minutes means :00, :15, :30, :45. |
Nicknames are a shortcut for common schedules. @hourly means 0 * * * *, @daily and @midnight mean 0 0 * * *, @weekly means 0 0 * * 0, @monthly means 0 0 1 * *, and @yearly and @annually mean 0 0 1 1 *. @reboot runs once when cron starts, not on a repeating schedule. Paste a nickname into the generator to see its five-field form.
Common cron expressions
Click Load on any row to put that schedule into the generator and see its next runs. The table covers the schedules people ask for most, from every minute to once a year.
| Expression | Meaning | |
|---|---|---|
* * * * * | Every minute. | |
*/5 * * * * | Every 5 minutes. | |
*/15 * * * * | Every 15 minutes. | |
0 * * * * | Every hour, on the hour. | |
0 0 * * * | Every day at midnight. | |
30 2 * * * | Every day at 02:30. | |
0 9 * * 1-5 | Weekdays at 09:00. | |
*/30 9-17 * * 1-5 | Every 30 minutes, 09:00 to 17:30, weekdays. | |
0 0 * * 0 | Every Sunday at midnight. | |
0 0 1 * * | On the 1st of every month at midnight. | |
0 0 1,15 * * | On the 1st and 15th of every month at midnight. | |
0 0 1 1 * | On January 1 at midnight. |
Unix, Quartz, and AWS cron are three dialects
The five-field form on this page is Unix cron, the form used by crontab on Linux and macOS, GitHub Actions, Kubernetes CronJobs, and most CI systems. Two other dialects look similar and are not interchangeable. Pasting a six-field expression into a crontab will not install the job, and pasting a five-field expression into Quartz without the seconds field will be read as a different schedule.
| Dialect | Fields | Seconds | Day of week | Day fields |
|---|---|---|---|---|
| Unix crontab | 5 | No | 0-7, Sunday is 0 or 7 | Both restricted means either matches. |
| Quartz / Spring | 6 or 7 | Yes, first field | 1-7, Sunday is 1 | One day field must be ?. |
| AWS EventBridge | 6, inside cron() | No | 1-7, Sunday is 1 | One day field must be ?. Year is required. |
Quartz adds special characters this generator does not accept in Unix mode: ? for no specific value, L for the last day, W for the nearest weekday, and # for the nth weekday of the month. If you paste one of those, the generator says so instead of guessing. Quartz also numbers weekdays differently, so the translations above use weekday names (MON to SUN) to keep the day the same across dialects. A Quartz expression with a * in the seconds field fires every second, so the translation always writes 0 there. That is a real trap when converting by hand: prepending an asterisk to a five-field expression changes a once-a-minute job into a 60-times-a-minute job.
Five traps that catch real schedules
Most cron failures are not syntax errors. The expression installs fine and then runs at the wrong time, too often, or never. The generator checks for the first three traps in every schedule you enter.
Both day fields restricted means either, not both
This is the most common surprise in cron. When day of month and day of week are both restricted, crontab(5) runs the job when at least one matches. 0 0 13 * 5 runs on the 13th of every month and on every Friday. It does not mean Friday the 13th. To get one specific date, restrict one day field and leave the other as an asterisk. Quartz and AWS avoid the trap by forcing a question mark in one field.
A star in the minute field runs every minute
* 9 * * * does not mean 09:00. It means every minute of the 9 o clock hour: 60 runs. The same mistake in the other direction, 0 */6 * * * versus */6 0 * * *, is the difference between every six hours and ten runs in the first hour after midnight. Fix the minute field first, then check the next runs list before deploying.
Some dates never arrive
February 30 and February 31 match no date in any year, so a job set for them never runs and cron reports no error. February 29 runs only in leap years, roughly once every four years. April 31, June 31, September 31, and November 31 never arrive either. The generator searches four years ahead and says plainly when a schedule has no runs in that window.
The timezone belongs to the server, not the expression
A cron expression carries no timezone. The machine or service that runs the job decides what 09:00 means. A job written for 09:00 in Singapore runs at 01:00 UTC on the same server if the server clock is UTC, and a 02:30 job can run twice, once, or not at all on the day clocks change for daylight saving. GitHub Actions always uses UTC. Set the timezone in the generator to the timezone of the server, and check the next runs there.
Output with nowhere to go
Cron sends a job's output to the local mail system unless the line redirects it. On a server with no mail setup, that output is easy to lose, and a noisy job can fill a mailbox. The crontab line builder above appends output to a log file by default. Add a lock with flock when a slow job must not overlap with its next run: without one, a job that takes 10 minutes on a 5 minute schedule runs twice at once.
Frequently asked questions
What is a cron expression?
A cron expression is five fields that tell a scheduler when to run a job: minute, hour, day of month, month, and day of week. Each field is a pattern, such as a single number, a list, a range, or a step. The expression 0 9 * * 1-5 runs at 09:00 on weekdays.
How do I read a cron expression?
Read the five fields left to right: minute (0 to 59), hour (0 to 23), day of month (1 to 31), month (1 to 12), day of week (0 to 7, where 0 and 7 both mean Sunday). An asterisk means every value in that field. Paste any expression into the generator above to get the plain English version.
What does */5 mean in cron?
The slash is a step. In the minute field, */5 means every fifth minute starting at 0, so the job runs at :00, :05, :10, and so on. It counts from the start of the field, not from when the job was added.
Why does my job run on the 13th and on every Friday?
In standard cron, when both the day of month and the day of week are restricted, the job runs when either one matches. The expression 0 0 13 * 5 runs on the 13th of every month and on every Friday. Leave one of the two day fields as an asterisk to avoid the surprise.
Can cron run every 30 seconds?
Not in standard five-field cron, where one minute is the smallest unit. Quartz and Spring schedulers add a seconds field, so a six-field expression can run every 30 seconds there. On Linux, use a systemd timer or a loop inside the job for work faster than once a minute.
What is the difference between Unix cron, Quartz, and AWS EventBridge cron?
Unix cron uses five fields and numbers the day of week 0 to 7 from Sunday. Quartz adds a seconds field first, an optional year last, and numbers the day of week 1 to 7 from Sunday. AWS EventBridge uses six fields inside cron(), requires a year field, and requires a question mark in one of the two day fields. The generator above translates one schedule into all three forms.
Which timezone do the next run times use?
The timezone you pick in the generator. A cron expression itself has no timezone: the machine or service that runs the job decides. GitHub Actions always uses UTC. Check the next runs in the timezone of the server that will run the job, not only in your own.
How do I add a cron job to my server?
Run crontab -e, paste one line with the five schedule fields followed by the command, and save. Use absolute paths for the command, because cron runs with a small environment. The generator above builds the full line for you, with optional output redirection.
Sources
- Linux man-pages, crontab(5): https://www.man7.org/linux/man-pages/man5/crontab.5.html (five fields, the day-field matching rule, nicknames, and the CRON_TZ variable).
- Quartz.NET, Cron Expression Reference: https://www.quartz-scheduler.net/documentation/quartz-4.x/cron-expressions.html (six and seven field forms, seconds field, question mark, L, W, and hash tokens).
- Amazon EventBridge, schedule patterns for scheduled rules: https://docs.amazonaws.cn/en_us/eventbridge/latest/userguide/eb-scheduled-rule-pattern.html (six fields inside cron(), year required, one day field must be a question mark).
This page is an independent tool, not affiliated with any scheduler vendor. Field ranges and matching rules follow crontab(5); dialect translations follow the Quartz and AWS documents linked above. Next run times are computed in your browser for the timezone you pick, and the server that runs the job may use a different timezone.
Agents
Machine readable summary for AI assistants: