Guide

How Cron Expressions Work (and How to Build One)

Understand the five fields of a cron expression, how to read them, and how to build schedules with confidence.

A cron expression is a compact string that describes a recurring schedule — the format used by crontab, Kubernetes, and many job schedulers. A cron generator helps you build one without memorising the syntax, and shows the next run times so you can verify it.

The five fields of cron

A standard cron expression has five fields separated by spaces, in order: minute, hour, day-of-month, month, day-of-week. Each field accepts a number, a list (1,15), a range (1-5), a step (*/15), or * for "every". Some schedulers add a sixth seconds field at the front.

How to read a cron expression

  • 0 2 * * * — 02:00 every day.
  • */15 * * * * — every 15 minutes.
  • 0 9 * * 1-5 — 09:00 on weekdays.
  • 0 0 1 * * — midnight on the first of every month.
  • 0 0 1 1 * — midnight on January 1st each year.

How to build a schedule

  1. Pick a preset (daily, weekly, hourly) or start from blank.
  2. Set each field using the dropdowns or by typing values.
  3. Read the plain-English description to confirm the meaning.
  4. Check the next run times to verify the schedule fires when expected.
  5. Copy the cron expression into your crontab or config.

Examples

A nightly backup at 03:30 is "30 3 * * *". A report every Monday at 09:00 is "0 9 * * 1". A health check every 10 minutes during business hours is harder in one expression (cron has no "between" across fields), so you might use "*/10 9-17 * * 1-5".

When a cron generator is useful

  • Scheduling backups, reports, or cleanups.
  • Configuring Kubernetes CronJobs or CI pipelines.
  • Verifying a schedule before deploying it.
  • Learning cron syntax with live feedback.

Put it into practice

Use the Cron Expression Generator right now — free, in your browser, no sign-up required.

Try the Cron Expression Generator