← All tools

Cron expressions in practice

How the five (or six) fields work, examples you can reuse, and mistakes that fire jobs at the wrong time. Build or decode expressions with the live Cron Generator.

What a cron expression is

A cron expression is a compact schedule: fields for minute, hour, day of month, month, and day of week (some systems add a seconds field at the front). Special characters such as * (any), , (list), - (range), and / (step) combine to mean “every N units” or “on these days.” The expression does not run anything by itself — a cron daemon, CI scheduler, or cloud job runner interprets it.

Field order (common five-field form)

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

Always confirm whether your platform uses five fields, six (with seconds), or a proprietary variant (AWS, Kubernetes CronJob, GitHub Actions all have nuances). Fieldkit’s generator targets the familiar Unix-style patterns and explains them in plain language — open the Cron Generator to compose or decode interactively.

Practical examples

  • 0 9 * * 1-5 — 09:00 every weekday (Monday–Friday).
  • */15 * * * * — every 15 minutes.
  • 0 0 1 * * — midnight on the first day of each month.
  • 30 2 * * 0 — 02:30 every Sunday (confirm Sunday numbering on your system).
  • 0 */6 * * * — on the hour, every six hours.

When day-of-month and day-of-week are both restricted (not *), behavior differs by implementation: some run when either matches, some require both. Read your runner’s docs before combining them.

Common pitfalls

  • Time zones. Servers often run in UTC. “9am” in the expression may not be 9am where your users live unless the runner is configured for that zone.
  • Sunday numbering. Some systems use 0–6, others allow 7 for Sunday, and names like SUN appear only in certain dialects.
  • February 30. Day-of-month values that never occur in a month simply do not fire — easy to miss in quarterly jobs.
  • Steps vs lists. */10 in minutes is every ten minutes from 0; that is not always the same as an arbitrary list you had in mind.
  • Seconds field surprise. Pasting a six-field expression into a five-field crontab shifts meaning. Count the fields before you save.

Debugging a schedule

Write the intended plain-English rule first (“weekdays at 09:00 America/Sao_Paulo”), then translate to fields, then verify on a calendar for the next two weeks — including a month boundary. Use Fieldkit to decode an unfamiliar line from a teammate’s crontab before you change production.

For related time conversions (Unix epoch ↔ human dates), see the Timestamp Converter.

Open the live tool

Open Cron Generator — build or decode an expression in your browser. Related: FAQ · JSON pretty-print guide.