Cron Expression Generator
Built and verified by pengchun · Last reviewed · How we verify
Build and read cron expressions in plain English. Pick minute, hour, day, month and weekday, then copy the crontab line and see the next run times.
NEXT RUNS (YOUR LOCAL TIME)
Cron expressions are five fields of time
A cron expression is a five-field shorthand that tells a Unix or Linux scheduler when a job should run. Each field is separated by a space, and together they describe one recurring moment: which minute, which hour, which day of the month, which month and which day of the week.
The fields always appear in the same order, which is why a cron line is often written as minute hour day-of-month month day-of-week. Get the order wrong and the job quietly runs at the wrong time, so it is worth building the expression instead of guessing at it.
Cron field order and accepted values
| Field | Allowed values | Special characters |
|---|---|---|
| Minute | 0-59 | * , - / |
| Hour | 0-23 | * , - / |
| Day of month | 1-31 | * , - / |
| Month | 1-12 or jan-dec | * , - / |
| Day of week | 0-6 or sun-sat (0 and 7 are Sunday) | * , - / |
The four special characters do most of the work. An asterisk means every value, a comma builds a list such as 1,15, a hyphen builds a range such as 1-5, and a slash adds a step so */5 means every fifth value counted from the start of the field.
Common cron expressions
| Expression | Meaning |
|---|---|
*/5 * * * * | Every 5 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 |
0 0 1 * * | Midnight on the first day of every month |
0 4 * * 0 | Every Sunday at 04:00 |
0 0 1 1 * | Once a year, on January 1 |
Reading the next run times
- Pick a preset to start from a schedule you already recognise, or type straight into the five fields.
- Press Build expression. Every field is validated and any field that cannot be parsed is called out by name.
- Read the plain-English summary and the next five run times in your own local time zone.
- Copy the crontab line, paste it into
crontab -e, and append the command you want to run.
Cron tips and gotchas
- When day-of-month and day-of-week are both restricted, cron runs the job when either matches, not both. A line such as
0 0 13 * 5fires on the 13th of the month and on every Friday. - Cron follows the server's local time zone. A job set for 02:00 can appear to skip or repeat when daylight saving time moves the clock.
- Classic crontab entries have five fields. Quartz-style schedulers add a seconds field in front, and systemd timers use a different syntax entirely, so check which scheduler you are writing for.
*/5in the minute field fires at 0, 5, 10 and so on, not five minutes after the previous run finished, so a long job can overlap with itself.- Day and month names are accepted by most cron implementations, but plain numbers work everywhere.
Two timing problems are worth their own paragraph, because both look like a broken schedule when they are not. Cron reads the clock of the machine it runs on, so a job set for 02:30 can skip a day or run twice on the morning a region changes its clocks — the daylight saving time calculator lists those dates and shows the offset either side of them. And when you are matching a schedule against log lines, remember that logs are usually written in UTC while the schedule is local: the timestamp converter turns one into the other so the two can be compared.
FAQ
What does */5 mean in cron?
It means every fifth value. In the minute field */5 runs the job at minutes 0, 5, 10, 15 and so on up to 55, so it fires twelve times an hour. The step always counts from the start of the field rather than from the previous run.
Why is my cron job not running when I expect?
The usual causes are the day-of-month and day-of-week OR rule, a server time zone that differs from yours, and a command that needs its full path. Build the expression here, check the next run times, and confirm the schedule you pasted is the schedule you generated.
Does cron use five fields or six?
The classic Unix crontab uses five fields, starting with minutes. Quartz-style schedulers add a leading seconds field, which makes six or seven fields in total. This generator produces the standard five-field format used by crontab -e on Linux and macOS.