Skip to content
Free · Runs in your browser

Cron Expression Explainer

Paste a crontab expression to read it in plain English, check each field and list the next ten times it will run, in your time zone or in UTC.

Five fields: minute, hour, day of month, month, day of week. Macros such as @daily also work.

Examples

In plain English

At 09:00, on Monday through Friday.

Field by field

FieldValueMatches
Minute0–5900
Hour0–2399
Day of month1–31*every day
Month1–12*every month
Day of week0–7 (0 and 7 = Sunday)1-5Mon–Fri

Next 10 runs

Show times in

Calculating…

The five fields of a cron expression

A standard cron expression has five fields separated by spaces. The job runs every minute in which all of them match:

┌──────── minute        0–59
│ ┌────── hour          0–23
│ │ ┌──── day of month  1–31
│ │ │ ┌── month         1–12 or JAN–DEC
│ │ │ │ ┌ day of week   0–7 or SUN–SAT (0 and 7 are Sunday)
│ │ │ │ │
0 9 * * 1-5   → 09:00 every Monday to Friday

Each field accepts the same building blocks:

  • * means every value. * in the hour field means every hour.
  • A list such as 1,15 matches each value given.
  • A range such as 9-17 includes both ends. Standard cron does not wrap around, so write 22:00 to 02:00 as 22-23,0-2.
  • A step such as */15 takes every 15th value of the range, so in the minute field it means 0, 15, 30 and 45. 5-59/15 gives 5, 20, 35 and 50.
  • Names of months and weekdays (JAN, MON) are case-insensitive and work in single values and ranges.

Shortcuts such as @hourly, @daily, @weekly, @monthly and @yearly stand for fixed expressions. @reboot is different: it runs once when the cron daemon starts.

The day-of-month and day-of-week trap

The two day fields are combined in a way that surprises almost everyone. If both are restricted, a day matches when either field matches. So 0 0 1 * MON does not mean “the first of the month if it is a Monday”. It runs on the 1st of every month and on every Monday.

If either field starts with an asterisk, both must match instead. That is why 0 0 */2 * MON runs only on Mondays that fall on an odd day of the month, even though */2 looks restricted. This tool applies the same rules as the cron daemon found on most Linux systems and spells the result out in the description.

To run a job on the first Monday of the month, schedule it for days 1 to 7 and check the weekday in the command itself, for example 0 9 1-7 * * [ "$(date +\%u)" = 1 ] && ./report.sh. Note the backslash: in a crontab, an unescaped % starts a new line of input to the command.

Time zones and daylight saving time

Cron uses the time zone of the machine or service that runs it, not yours. Many servers and container images run on UTC, and so do hosted schedulers such as GitHub Actions. Kubernetes CronJobs use the controller’s time zone unless you set timeZone. Switch the run list above between your time zone and UTC to see both.

Daylight saving time causes two classic problems on servers that use local time. On the night the clocks go forward, times in the skipped hour do not exist, and on the night they go back, an hour happens twice. Depending on the cron implementation, a job scheduled in that hour may be skipped, run late or run twice. Schedule important jobs outside 01:00–03:00 local time, or run the server on UTC.

Common schedules

  • */5 * * * *: every five minutes, for health checks and queue workers.
  • 30 2 * * *: daily at 02:30, a typical slot for backups and clean-up jobs.
  • 0 9 * * 1-5: weekdays at 09:00, for reports and reminders.
  • 0 0 1 * *: midnight on the first of each month, for invoices and monthly rollups.
  • 0 6 1 1,4,7,10 *: 06:00 on the first day of each quarter.
  • 15 3 * * 0: Sundays at 03:15, for weekly maintenance.

Spread jobs out instead of putting everything at minute 0. If thousands of machines run 0 * * * *, they all hit the same API or database at the same second. A random-looking minute such as 17 * * * * spreads the load.

Quartz, Spring and other cron formats

Some schedulers extend cron. Quartz and Spring expressions add a seconds field at the start, and Quartz an optional year at the end, so they have six or seven fields. They also support ? (no specific value), L (last day), W (nearest weekday) and # (the nth weekday, as in MON#1). Those are not valid in a crontab, and this tool reports them instead of guessing.

AWS EventBridge uses six fields with a year at the end, and some libraries count weekdays from 1 instead of 0. Before deploying, check which dialect your scheduler expects. If the job writes a timestamp to its log, the Unix timestamp converter helps confirm when it really ran.

Frequently asked questions

What does */5 mean in cron?

Every fifth value of the field’s full range. In the minute field */5 means minutes 0, 5, 10 … 55, so the job runs every five minutes on the hour’s five-minute marks.

How do I run a cron job every 30 seconds?

Standard cron cannot: its smallest unit is one minute. Run the command twice from one entry (once immediately and once after sleep 30), or use a scheduler with a seconds field, such as a systemd timer.

Is Sunday 0 or 7 in cron?

Both. Standard cron accepts 0 and 7 for Sunday, 1 for Monday through 6 for Saturday. You can also write SUN, MON and so on.

Why did my job run on an unexpected day?

Most likely both day fields are restricted. When the day-of-month and day-of-week fields are both set, cron runs when either matches, not when both do.

Which time zone does cron use?

The time zone of the system or service running it. Servers, containers and hosted CI schedulers often use UTC, so a job set for 09:00 may run at a different local time for you.

Why does my expression have six fields?

Six- and seven-field expressions come from Quartz, Spring or similar schedulers, which add seconds (and sometimes a year). Remove the seconds field to check the remaining five here, and keep the extended format for the scheduler that needs it.

All tools

Need something bigger than a browser tool?

We design and build web apps, internal tools, APIs and cloud infrastructure for teams that need them done properly. Tell us what you are working on.