Crontab builder & explainer

Build a cron schedule visually and read back what it means in plain English.

Runs at 02:30, every day.
Field breakdown
Minuteminute 30Hourhour 2Day of monthevery dayMonthevery monthDay of weekevery day
Standard 5-field cron (minute, hour, day-of-month, month, day-of-week). Parsed in your browser.

Have feedback or an idea for this tool?

What is a crontab expression?

A crontab expression is the five-field schedule that tells the cron daemon on a Unix or Linux server when to run a job. The fields are minute, hour, day of month, month and day of week, and each accepts a specific value, a list, a range or a step, such as an asterisk for every value or a slash for intervals. This tool builds an expression from plain choices and reads any expression back in plain English, so you can see exactly when it will fire before you install it. Enter or assemble a schedule to check it. A small mistake, like confusing day of month with day of week, can make a job run far more or less often than intended. Use it to schedule backups, cleanups or reports, and to confirm a line means what you expect.

Key facts

  • A standard cron expression has five space-separated fields in order: minute (0-59), hour (0-23), day-of-month (1-31), month (1-12) and day-of-week (0-6, where 0 is Sunday).
  • The expression 0 2 * * * runs a job at 02:00 every day, and */15 * * * * runs every 15 minutes.
  • Cron operators are the star (every value), comma (a list), hyphen (a range) and slash (a step), so */10 means every 10th value.
  • When both day-of-month and day-of-week are restricted, cron runs the job when either matches, not both.
  • Cron uses the server's local timezone unless it is configured otherwise, so a schedule fires in whatever zone the machine is set to.

The five cron fields

A standard cron expression is five space-separated fields, in this fixed order: minute (0-59), hour (0-23, on a 24-hour clock), day of month (1-31), month (1-12), and day of week (0-6, where 0 is Sunday). Some systems also accept 7 for Sunday and three-letter names like jan or mon.

Read left to right as 'at minute M, at hour H, on day-of-month D, in month N, on weekday W'. So 30 6 1 * * means 06:30 on the 1st of every month. The sixth-field 'seconds' variant you may see in Quartz or systemd is not standard Unix cron - classic crontab has exactly five fields.

Each field can hold a single number, or one of the special characters below to cover multiple values.

Special characters and macros

Four operators do most of the work. A star (*) means 'every value' for that field. A comma builds a list, so 0,15,30,45 means those four minutes. A hyphen builds a range, so mon-fri in the weekday field means Monday through Friday. A slash sets a step, so */15 in the minute field means every 15th minute (0,15,30,45), and 0-30/10 means 0,10,20,30.

Most cron implementations also accept shorthand macros in place of the five fields: @yearly (or @annually) = 0 0 1 1 *, @monthly = 0 0 1 * *, @weekly = 0 0 * * 0, @daily (or @midnight) = 0 0 * * *, and @hourly = 0 * * * *. There is also @reboot, which runs once when cron starts after a boot rather than on a clock schedule.

This builder lets you pick these visually and shows the resulting expression, so you do not have to memorise the operators. It reads back a plain-English description too, the same idea as crontab.guru.

Worked examples

* * * * * runs every minute. */15 * * * * runs every 15 minutes. 0 * * * * runs at the top of every hour.

0 2 * * * runs at 02:00 every day - a common choice for nightly backups. 30 9 * * 1-5 runs at 09:30 on weekdays only. 0 0 * * 1 runs at midnight every Monday.

0 */6 * * * runs every 6 hours (00:00, 06:00, 12:00, 18:00). 0 0 1 * * runs at midnight on the 1st of each month. 0 22 * * 6 runs at 22:00 every Saturday.

Two things that trip people up

The day-of-month / day-of-week OR gotcha: when BOTH the day-of-month and day-of-week fields are restricted (neither is *), cron runs the job when EITHER matches, not both. So 0 0 13 * 5 runs at midnight on the 13th AND on every Friday - not only on Friday the 13th. To require both conditions you generally test one of them inside the command itself.

Timezone: cron uses the server's local time, not UTC and not your laptop's time. A job set for 0 2 * * * fires at 02:00 in whatever timezone the machine is configured to. On an India VM, confirm the clock is IST (run timedatectl) before you rely on the schedule, or your 2am job may actually run at 07:30 IST if the box is on UTC.

Every 15 minutes? Try the builder · Host your cron jobs on ServerCake

Glossary

Cron expression
A standard cron expression is five space-separated fields, in order minute (0-59), hour (0-23), day-of-month (1-31), month (1-12) and day-of-week (0-6, where 0 is Sunday), that define when a job runs.
Field operators
Cron field operators are the star for every value, the comma for a list, the hyphen for a range and the slash for a step. For example 0,15,30,45 is a list and mon-fri is a range.
Step value
A step value uses a slash to run at a fixed interval within a field, so */15 in the minute field means every 15th minute (0, 15, 30, 45) and 0-30/10 means 0, 10, 20, 30.
Macro (@daily)
A macro is a shorthand that replaces the five fields, such as @hourly, @daily, @weekly, @monthly and @yearly, plus @reboot which runs once when cron starts after a boot rather than on a clock schedule.
Day-of-month / day-of-week OR rule
When both the day-of-month and day-of-week fields are restricted (neither is a star), cron runs the job when either matches, not both. So 0 0 13 * 5 runs on the 13th and on every Friday.
Server timezone
Cron fires on the server's local timezone unless configured otherwise, not UTC or your laptop's time. A schedule set for 02:00 runs at 02:00 in whatever zone the machine is set to.

Questions, answered.

What do the five fields in a cron expression mean?+

In order they are minute (0-59), hour (0-23), day of month (1-31), month (1-12) and day of week (0-6, Sunday is 0). A star in a field means 'every', so 0 2 * * * runs at 02:00 every day.

How do I run a cron job every 5 minutes?+

Use */5 in the minute field and stars elsewhere: */5 * * * *. The slash sets a step, so this fires at minute 0, 5, 10 and so on, every hour of every day.

How do I run a cron job every 15 minutes or every hour?+

Every 15 minutes is */15 * * * *. Every hour is 0 * * * * (at minute 0 of each hour), or the macro @hourly. For every 6 hours use 0 */6 * * *.

What is the cron expression for a daily job at a set time?+

Put the minute and hour and leave the rest as stars. Daily at 2am is 0 2 * * *; daily at 09:30 is 30 9 * * *. You can also use @daily, which is 0 0 * * *, for midnight every day.

What do the *, comma, hyphen and slash mean?+

A star means every value; a comma is a list (0,30 = minutes 0 and 30); a hyphen is a range (mon-fri); and a slash is a step (*/10 = every 10th value). They can be combined, for example 0-30/10 means 0, 10, 20, 30.

Why does my job with both a day-of-month and a weekday run more often than expected?+

When both the day-of-month and day-of-week fields are set (neither is *), cron runs the job when EITHER matches, not both. So 0 0 13 * 5 runs on the 13th and on every Friday, not only on Friday the 13th. To require both, test one condition inside the command.

Which time zone does cron use?+

Cron runs in the server's local time zone, not UTC or your laptop's time. Check it with timedatectl and make sure the VM is set to the zone you expect, such as IST, before relying on the schedule.

What are cron macros like @daily and @reboot?+

Macros replace the five fields with a shorthand: @hourly, @daily, @weekly, @monthly and @yearly map to common schedules, while @reboot runs the job once when cron starts after a boot rather than on a clock schedule.

Built by the ServerCake team

Cloud that speaks India.

These tools run on ServerCake infrastructure in India. When our cloud opens, you get VMs and managed databases priced in ₹, billed with GST, on India-resident infrastructure. Reserve your spot for early access.

Reserve your spot