Cron expressions explained with examples

Published by InstantToolDeck · Updated November 2026

Cron is the scheduler built into Linux and many hosting platforms. A cron expression tells it when to run a command.

The five fields

┌───────── 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)
* * * * *

Special characters

  • * means every value.
  • , separates a list: 1,15.
  • - is a range: 9-17.
  • / is a step: */10 is every 10 units, 10-50/10 is 10, 20, 30, 40, 50.

Useful examples

ExpressionRuns
*/5 * * * *Every 5 minutes
0 * * * *At the start of every hour
0 0 * * *Every day at midnight
30 8 * * 1-508:30 on weekdays
0 9 1 * *09:00 on the first of each month
0 0 * * 0Every Sunday at midnight
0 0 1 1 *Once a year on 1 January

Many systems accept shortcuts: @hourly, @daily, @weekly, @monthly and @yearly.

Gotchas

  • Day-of-month and day-of-week are OR-ed when both are restricted. 0 0 13 * 5 runs on the 13th and on every Friday, not just on Friday the 13th.
  • Time zones: cron uses the server's time zone, often UTC. Daylight saving changes can skip or repeat runs scheduled near the switch.
  • Environment: cron runs with a minimal environment. Use full paths to commands and files.
  • Seconds: standard cron has no seconds field. Some schedulers (Quartz, Spring) add one, giving six fields.
  • Overlap: if a job takes longer than its interval, runs can overlap. Use a lock.

Check before you deploy

Paste an expression into the Cron Expression Explainer to read it in plain English and see the next run times. To convert those times to epoch seconds, use the timestamp converter.

Frequently asked questions

How do I run a cron job every 10 minutes?

Use */10 * * * *.

What does 0 0 * * * mean?

Every day at midnight, in the server's time zone.

Why did my cron job not run?

Common causes are a wrong time zone, a missing full path, a missing newline at the end of the crontab, or an error in the command. Check the cron log.

Does cron support seconds?

Standard cron does not. Some schedulers add a seconds field and use six values.

← All guides