Skip to main content
Redmoon Converters
⏱️

Cron Expressions Explained: From Every Minute to Once a Year

The five cron fields, what the special characters mean, and a cheat sheet of ready-to-use schedules — so you stop guessing whether your job runs when you think.

Developer ToolsDevOpsScheduling

Cron is the scheduling syntax that runs the internet’s background work: backups, report emails, cache warmers, cleanup jobs. It’s also famously easy to get subtly wrong — 0 0 * * * and * * * * 0 look similar and do wildly different things. This guide makes the five fields click so you can read and write schedules with confidence.

The five fields

A standard cron expression is five space-separated fields:

┌───────────── minute        (0–59)
│ ┌───────────── hour         (0–23)
│ │ ┌───────────── day of month (1–31)
│ │ │ ┌───────────── month       (1–12)
│ │ │ │ ┌───────────── day of week (0–6, Sunday = 0)
│ │ │ │ │
* * * * *

Each field answers “on which values of this unit should the job fire?” A * means “every.” So * * * * * is every minute of every hour of every day — the most aggressive schedule there is.

The special characters

Four symbols unlock almost everything you’ll ever need:

  • * — every value. * * * * * = every minute.
  • , — a list. 0 9,17 * * * = at 09:00 and 17:00.
  • - — a range. 0 9-17 * * * = every hour from 09:00 to 17:00.
  • / — a step. */15 * * * * = every 15 minutes; 0 */2 * * * = every 2 hours.

Combine them freely: */10 9-17 * * 1-5 means “every 10 minutes, between 9am and 5pm, Monday to Friday.”

A cheat sheet

ScheduleExpression
Every minute* * * * *
Every 15 minutes*/15 * * * *
Every hour, on the hour0 * * * *
Every day at midnight0 0 * * *
Every day at 6:30am30 6 * * *
Weekdays at 9am0 9 * * 1-5
Every Sunday at 3am0 3 * * 0
First of the month, midnight0 0 1 * *
Once a year (Jan 1, 00:00)0 0 1 1 *

The gotcha: day-of-month vs. day-of-week

The trickiest rule in cron: when both the day-of-month and day-of-week fields are restricted (neither is *), most cron implementations treat them as OR, not AND. So 0 0 13 * 5 doesn’t mean “Friday the 13th” — it means “the 13th of the month or any Friday.” If you need a specific weekday-and-date combination, you usually handle it with a check inside the job itself.

Because these rules are easy to misread, the Cron Expression Builder lets you assemble a schedule from dropdowns and shows the next run times in plain language — the fastest way to confirm a job fires when you intend.

Scheduling and timestamps go hand in hand. When a job logs a Unix epoch time and you need to know what moment that actually was, the Unix Timestamp converter translates between epoch seconds and human dates. And if your job filters log lines or validates input, the Regex Tester lets you build and explain the pattern before you ship it.

Frequently asked questions

Is 0 Sunday or is 7? 0 is Sunday in every implementation; many also accept 7 as Sunday for convenience.

What timezone does cron use? Traditionally the server’s local time. Managed schedulers often let you set a timezone explicitly — always check, especially around daylight-saving shifts.

Why didn’t my */40 * * * * run every 40 minutes? Steps count from 0 within each field, so */40 on minutes fires at :00 and :40, then resets at the next hour — not a clean 40-minute cycle. Steps work cleanly only when they divide evenly into the field’s range.

Build your next schedule on the Cron Expression Builder and read back exactly when it will run before you commit it to a crontab.

Try the tools from this guide