Developer
Cron Expression
A cron expression is a compact string of time fields that tells a scheduler exactly when a recurring job should run.
Updated 12 Aug 2026
Five fields, one schedule
A standard cron expression has five space-separated fields: minute, hour, day of month, month and day of week. A job runs when the current time matches every field. Some schedulers prepend a seconds field or append a year, which is why an expression copied between systems can behave unexpectedly.
| Field | Range | Notes |
|---|---|---|
| Minute | 0–59 | |
| Hour | 0–23 | 24-hour clock |
| Day of month | 1–31 | |
| Month | 1–12 | Names such as JAN are often accepted |
| Day of week | 0–6 | 0 is Sunday in most implementations |
Special characters
- * — every value in the field
- */n — every n units, so */5 in minutes means :00, :05, :10 and so on
- a-b — an inclusive range, such as 9-17 for working hours
- a,b,c — a list of specific values
When both day of month and day of week are restricted, most cron implementations run the job if either matches, not both. This surprises people writing schedules like "the 1st, but only on a Monday".
Worked examples
| Expression | Meaning |
|---|---|
| */5 * * * * | Every five minutes |
| 0 * * * * | Hourly, on the hour |
| 30 2 * * * | Every day at 02:30 |
| 0 9 * * 1-5 | 09:00 on weekdays |
| 0 0 1 * * | Midnight on the first of each month |
Cron Expression
Build a schedule visually, read it in plain English and preview the next runs.
Characteristics
- Five fields in standard Unix cron, six or seven in some schedulers
- Matches on wall-clock time in the scheduler's timezone
- Supports wildcards, steps, ranges and lists
- Stateless — a missed run is not replayed by default
Common uses
- Nightly backups, exports and report generation
- Cache warming and cleanup jobs
- Polling external systems on a fixed interval
- Scheduled emails, digests and reminders
Advantages
- One short string expresses complex recurring schedules
- Supported by Linux, Kubernetes, CI systems and most job runners
- No dependencies or extra infrastructure required
- Easy to version-control alongside application code
Limitations
- Cryptic to read without a translator
- Daylight-saving transitions can skip or repeat a run
- Overlapping executions must be prevented by the job itself
- No native retries or failure alerting
Examples
15 3 * * 1
│ │ │ │ └── day of week: Monday
│ │ │ └──── month: every
│ │ └────── day of month: every
│ └──────── hour: 03
└─────────── minute: 15
=> 03:15 every MondayFrequently asked questions
What does */5 * * * * mean?
Run every five minutes, at every hour of every day.
How do I run a job every weekday morning?
Use 0 9 * * 1-5 for 09:00 Monday to Friday in the scheduler's timezone.
Which timezone does cron use?
The host or scheduler timezone, which is often UTC on servers. Set it explicitly where possible.
Why did my job run twice?
Either a daylight-saving change repeated the hour, or a previous run had not finished and overlapped.
Do all cron systems use five fields?
No. Quartz and some cloud schedulers add seconds or a year, so check the target syntax before copying.
Related terms
API
An API (Application Programming Interface) is a defined contract that lets one piece of software request data or actions from another without knowing how it works internally.
SQL
SQL (Structured Query Language) is the standard language for defining, querying and modifying data held in relational databases.
Regex
A regular expression (regex) is a compact pattern language for finding, validating and replacing text that matches a described shape rather than a fixed string.
Character Encoding
Character encoding is the mapping between the characters people read and the bytes computers store, defining how text is turned into binary and back again.
Minification
Minification removes every byte a machine does not need — whitespace, line breaks, comments and long names — from code or data without changing what it does.
Base64
Base64 is an encoding scheme that represents binary data using 64 printable ASCII characters so it can travel safely through text-only channels.
Related tools
Related guides
JSON vs XML: Which Format Should You Use?
A practical JSON vs XML comparison: syntax, size, parsing speed, schemas, comments, attributes and metadata — plus clear guidance on which format fits which job.
How to Format JSON (Beautify, Indent and Minify)
Learn how JSON formatting works, see a before-and-after example, fix the errors that block beautifying, and format JSON online in your browser without uploading a file.
Why Does Compressing an Image Make It Bigger?
When image compression increases file size: re-encoding optimized JPEGs, PNG for photos, quality/format mismatches, and Max quality with no downsampling. How Image Compressor warns instead of faking a win — and what to try next.
What Is JSON? A Plain-English Guide
JSON explained without jargon: what it is, how the syntax works, which data types it supports, where it is used and how it differs from JavaScript objects.