Cron Expression Examples: A Cheat Sheet for Common Schedules

TL;DR · Short answer

Cron expression examples make sense once you match each field to its job: minute, hour, day, month, weekday. This cheat sheet lists the most common schedules — every minute, midnight, every Monday, the first of the month — in plain English, flags the syntax traps around Sunday and wildcards, and points to Crontab Guru for live validation before anything ships to a real crontab.

Common cron expression examples and what they mean

A handful of cron expression examples cover most of the scheduled jobs anyone actually runs: something that fires on every tick of the clock, once a day, once a week, or once a month. The table below lists the patterns that come up constantly in scripts, backups, cron-triggered deploys and monitoring checks, each written as five space-separated fields, followed by its plain-English meaning and a typical use case. Crontab Guru, listed in the Development Tools section of the directory, turns any one of these strings into that same plain-English sentence the moment it is typed, which is the fastest way to double-check a pattern copied from a table like this one.

Two symbols do most of the work in these cron expression examples: the asterisk *, which means every value a field allows, and the slash, which sets a step. */5 in the minute field means every five minutes, while */2 in the hour field would mean every other hour. A number on its own, like the 0 in 0 0 * * *, pins a field to one exact value — here, minute zero of hour zero, which is midnight, with the remaining fields left as wildcards so the job runs on every day of every month regardless of the weekday.

How do you read a cron expression field by field?

Every cron expression is five fields separated by spaces, always in the same order: minute, hour, day of the month, month, and day of the week. Reading an expression left to right, 0 9 * * 1-5 breaks down as minute zero, hour nine, any day of the month, any month, and Monday through Friday for the day-of-week field — in other words, nine in the morning on weekdays only. Skipping a field is never allowed in standard cron; a wildcard fills in whichever field the job does not care about, which is why most simple schedules end up mostly asterisks with one or two fields pinned down.

The month field is the easiest of the five to reason about, since it only runs from 1 to 12, January through December, and accepts a comma-separated list or a range exactly like the other fields do. The day-of-week field sits at the end of the expression and runs from 0 to 7, which is where a common source of confusion starts, covered in the next section. Sitting between those two, the day-of-month field is the one most likely to produce a schedule that silently never fires in a given month, since not every month shares the same number of days on the calendar.

What are the common pitfalls in cron syntax?

The day-of-week field accepts both 0 and 7 as Sunday, and different cron implementations do not always agree on which one they expect or print back. Writing 0 0 * * 0 and 0 0 * * 7 is meant to schedule the exact same weekly job, but leaning on 7 for Sunday on a system that only recognizes 0 can silently produce a schedule that never runs on the intended day. Checking the exact expression against the target system before it goes live avoids this entire class of bug.

The other frequent trap is mixing up the asterisk * with the question mark ?. Standard cron only ever uses * as a wildcard, applied the same way across all five fields, but some schedulers such as Quartz use ? in the day-of-month or day-of-week field to mean no specific value, letting the other of the two fields take control instead. Assuming ? works in a plain crontab, or mixing the two conventions in the same expression, produces a schedule that either fails to parse outright or quietly fires on the wrong days.

Where can you test a cron expression before deploying it?

The safest way to confirm that one of these cron expression examples does what it is supposed to do is to paste it into a live parser rather than trust mental arithmetic. Crontab Guru is built exactly for that job: type an expression and it returns a plain-English explanation of the schedule along with its next execution times, so a mistyped step value or a field that got transposed shows up immediately, instead of after a job misfires in production.

Crontab Guru is free, works offline once it has loaded, and installs like an app, so it stays available even when checking a schedule before syncing changes to a server. According to its own site, a newer dashboard extension for the tool is a free, self-hosted, open source control panel for cron jobs, built by the same creators — a useful step up once copying single expressions one at a time stops being enough for a team.

For jobs that call out to a webhook once the schedule fires, Webhook.site is a matching tool for the other half of the problem: it hands out a unique URL that displays every incoming request in real time, including headers and body, so a cron-triggered notification can be checked without touching production infrastructure.

How do you build a cron expression for a recurring job?

Building a recurring schedule starts from the interval actually needed, not from memorizing syntax field by field. For a job that has to run every five minutes, set the minute field to a step value and leave the rest as wildcards, giving */5 * * * *. For a nightly job, pin the hour and minute fields to the exact time desired and leave the date-related fields open, so a task due at midnight becomes 0 0 * * *, running once for every day on the calendar.

A weekly job adds one more constraint on top of that pattern: set the day-of-week field to the weekday wanted, 1 for Monday for example, while day-of-month and month stay wildcards, which gives 0 0 * * 1. A monthly job works the other way around, pinning the day-of-month field to 1 for the first of the month and leaving day-of-week open, producing 0 0 1 * *. Reusing these cron expression examples as a starting point and adjusting a single field at a time keeps a new schedule easy to check by eye before it ever reaches Crontab Guru for a final test.

Frequently asked

How do I write a cron expression for every 5 minutes?

Set the minute field to a step value and leave the rest as wildcards: */5 * * * *. The */5 means every 5th minute, so the job repeats all through the hour instead of firing once. Pasting the expression into Crontab Guru confirms the exact next execution times before it goes into a real crontab.

What does a cron expression for every Monday look like?

Every Monday at midnight is 0 0 * * 1: minute zero, hour zero, any day of the month, any month, and weekday 1 for Monday. Swap the 1 for 2 through 5 to target other weekdays, or use 0 or 7 for Sunday depending on what the target scheduler expects.

What is the cron expression for running a job at midnight?

Midnight every day is 0 0 * * *: the minute and hour fields are both pinned to zero, and the day, month and weekday fields stay as wildcards so the job runs once every day regardless of the date.

Does Sunday count as 0 or 7 in a cron expression?

Both. The day-of-week field accepts 0 and 7 as Sunday, but not every cron implementation treats them identically, so an expression that relies on 7 can behave differently on a system that only recognizes 0. Testing the expression against the target scheduler, for example on Crontab Guru, is the reliable way to confirm which one it expects.

Where can I check what a cron expression does before using it?

Crontab Guru turns any cron expression into a plain-English explanation and lists its next execution times, free and without an account. It runs in the browser, works offline once loaded, and installs like an app for repeated use.

Apps mentioned

Keep reading

One email a month. Only the apps worth your time.

What they do, what they don't, and whether they actually work offline — we check. No roundup of everything we listed, no affiliate links.

Double opt-in — nothing is sent until you confirm. Unsubscribe any time.
Looking for more apps that work offline?

721+ Progressive Web Apps with current catalogue evidence — browse and install from your browser, no app store.

Browse the directory →