Cron Expressions Explained: A Beginner's Guide
Cron syntax looks cryptic until you know the pattern — here's what each field actually means, with real examples, and a free tool to build one without memorizing the syntax.
TCTechToolsCenter TeamA cron expression is a five-field pattern that tells a scheduler exactly when to run a job — used in Linux cron jobs, CI/CD pipelines, and countless scheduling tools. The syntax looks dense at first, but it's really just five fixed positions, each with its own meaning.
The five fields
- Minute (0–59)
- Hour (0–23)
- Day of month (1–31)
- Month (1–12)
- Day of week (0–6, where 0 is Sunday)
In order, that's: `minute hour day-of-month month day-of-week`. A `*` in any field means "every value" for that position.
Sponsored
Real examples
- `0 * * * *` — every hour, on the hour.
- `0 0 * * *` — once a day, at midnight.
- `*/15 * * * *` — every 15 minutes.
- `0 9 * * 1-5` — 9 AM, Monday through Friday only.
- `0 0 1 * *` — midnight on the 1st of every month.
Step-by-step: build a cron expression
- Open the Cron Expression Helper.
- Pick or type a schedule — the tool explains in plain English what it means as you build it.
- Check the next few run times it predicts to confirm it matches what you expect.
- Copy the expression into your scheduler, CI config, or cron job.
Common mistakes
- Confusing day-of-month and day-of-week fields — both can technically constrain the same run, and combining them without understanding the AND/OR interaction (most cron implementations treat them as OR when both are restricted) leads to unexpected extra runs.
- Forgetting that `*/15` style step values only start counting from the field's minimum (0), not from whatever time you deployed the job.
- Not accounting for server timezone, leading to jobs running at 2 AM local time instead of the intended hour.
Tools used in this article
Sponsored
Frequently asked questions
It means "every value" for that field — e.g. `*` in the hour field means the job can run at any hour, subject to the other fields.
TechToolsCenter Team
Product & Tools
The team behind TechToolsCenter — building fast, private, browser-based tools and writing practical guides on how to get the most out of them.
Related articles
What Is Kubernetes? Container Orchestration Explained for Beginners
Docker runs one container reliably. Kubernetes is the layer that manages hundreds of them across a cluster — scheduling, scaling and healing them automatically. Here's how it actually works.
What Is Docker? Containers Explained for Beginners
"Works on my machine" is exactly the problem Docker exists to eliminate. Here's what containers actually are, core concepts explained simply, and a real Dockerfile walked through line by line.
What Is a Feature Flag, and Why Do Teams Use Them?
A feature flag decouples "the code is deployed" from "the feature is live" — here's how percentage rollouts, kill switches and trunk-based development actually use that one idea.