> Markdown version of https://opspane.dev/cron/explainer/ for AI agents and readers: the same text, without navigation or the interactive tool.
>
> The tool computes its result with JavaScript in the browser, so this file holds the reference text, worked examples and FAQ. Open the page to run it on your own input.
>
> Answer endpoint for agents: the same URL parameters on https://opspane.dev/cron/explainer/answer.md return the computed result as Markdown, without JavaScript, e.g. https://opspane.dev/cron/explainer/answer.md?expr=0%202%20*%20*%200&tz=Europe%2FBerlin

# Cron Expression Explainer

Understand any cron expression in plain English, with timezone-aware next run times and warnings for schedules that never fire.

## Quick answer

- Five fields, in order: minute (0–59), hour (0–23), day of month (1–31), month (1–12 or jan–dec) and day of week (0–6 or sun–sat; crontab also accepts 7 for Sunday).
- `*` is every value, `,` a list, `-` a range and `/n` a step: `*/5` in the minute field runs at :00, :05 … :55.
- When both day fields are restricted, cron runs when either matches: `0 0 1 * 1` runs on the 1st of the month and on every Monday.
- Crontab uses the machine's time zone unless a `CRON_TZ` line sets one; a Kubernetes CronJob uses `spec.timeZone`, or else kube-controller-manager's zone.

## How to use

1. Paste or type a five-field cron expression, or one of the macros such as `@daily`.
2. Pick the platform that will run it — classic crontab and Kubernetes CronJob disagree on a few rules.
3. Pick the time zone the scheduler uses. The table shows the next 10 runs in that zone and in UTC, and the warnings call out anything that will surprise you.

Every result updates as you type, and the address bar keeps the expression, platform and time zone, so you can paste the link into a pull request or chat.

## Cron syntax

| Field | Allowed values | Example |
| --- | --- | --- |
| Minute | `0–59` | `*/15` every 15 minutes |
| Hour | `0–23` | `9-17` 09:00 through 17:00 |
| Day of month | `1–31` | `1,15` the 1st and 15th |
| Month | `1–12` or `jan–dec` | `*/3` January, April, July, October |
| Day of week | `0–6` or `sun–sat` (crontab also accepts `7`) | `1-5` Monday through Friday |

`*` means every value, `,` separates a list, `-` makes a range and `/n` adds a step. Macros: `@hourly`, `@daily`, `@weekly`, `@monthly` and `@yearly`; crontab adds `@reboot`, Kubernetes adds `@every 90m`.

## Gotchas this tool checks for

### Day-of-month OR day-of-week

If both day fields are restricted, cron runs when _either_ matches. `0 0 1 * 1` fires on the 1st of the month _and_ on every Monday. Crontab and Kubernetes even disagree on what “restricted” means: crontab treats any field containing `*` (such as `*/2`) as unrestricted, while Kubernetes only treats a bare `*` that way.

`0 0 1 * 1` July 2026

Expected: Mondays that fall on the 1st — July 2026 has none. Actual: the 1st **or** any Monday, so **5 runs**.

### Steps restart every cycle

`*/7` in the minute field runs at :00, :07 … :56 and then :00 again: the gap across the hour is 4 minutes. Steps restart every hour, day, month or year depending on the field.

`*/7 * * * *` Two consecutive hours

`*/7` means minute 0, 7, 14 … 56 of _every_ hour, so the run at :56 is followed by :00 only **4 minutes** later.

### Daylight saving time

According to the crontab(5) manual, times that do not exist during the spring-forward change never match, and times that happen twice in the fall-back hour match twice. A job at `30 2 * * *` in New York is skipped once a year and a job at `30 1 * * *` runs twice once a year. Choose your time zone above and the warnings name the exact dates.

`30 2 * * *` Sun 8 Mar 2026 · New York · clocks spring forward

`30 1 * * *` Sun 1 Nov 2026 · New York · clocks fall back

Times that do not exist never match; times that happen twice match twice. Both crontab and Kubernetes behave this way — pick your time zone above and the warnings name the exact dates.

### Kubernetes is not crontab

CronJob schedules are parsed by the Go library robfig/cron. It rejects `7` for Sunday, `@reboot` and `TZ=` inside the schedule (use `spec.timeZone`), and it accepts `@every`. Its algorithm also skips some runs during the 30-minute daylight-saving change on Lord Howe Island — this tool reproduces that so the preview matches what your cluster does.

## How the results are verified

The Kubernetes preview is checked against robfig/cron v3.0.1 — the version the CronJob controller uses — on hundreds of expressions, including the daylight-saving changes of 2026 in New York, Berlin, Lord Howe Island, Santiago and Beirut. The crontab rules follow the cronie crontab(5) manual. If you find a result that disagrees with your system, [tell us](https://opspane.dev/contact/): a confirmed mismatch becomes a new test case.

## FAQ

### What does */5 mean in a cron expression?

A slash adds a step. */5 in the minute field means every 5th minute starting from 0 (:00, :05, :10 … :55). The step restarts every hour, so */7 runs at :56 and then again at :00 — four minutes later, not seven.

### Why does my cron job run on days I did not expect?

When both day-of-month and day-of-week are restricted, cron runs when EITHER one matches. 0 0 1 * 1 runs on the 1st of every month and on every Monday, not only on Mondays that fall on the 1st.

### Which time zone does cron use?

Classic crontab uses the time zone of the machine running the cron daemon, unless a CRON_TZ line sets one. A Kubernetes CronJob uses spec.timeZone when set; otherwise the time zone of kube-controller-manager. Pick the zone that matches where the job really runs to see correct times.

### Is Sunday 0 or 7?

In crontab both 0 and 7 mean Sunday. Kubernetes CronJob (robfig/cron) only accepts 0–6 and rejects 7, so use 0 or SUN when a schedule must work in both.

### How do I run a job on the last day of the month?

Five-field cron has no "last day" value. Schedule days 28–31 and let the command check the date, e.g. 0 0 28-31 * * [ "$(date -d tomorrow +\%d)" = "01" ] && /path/to/job. In crontab, % must be escaped as \% because an unescaped % starts a new line of input.

## Related tools

- [Cron Expression Converter](https://opspane.dev/cron/translate/): Convert one schedule to crontab, Quartz, AWS EventBridge, GitHub Actions, Kubernetes and systemd — with next run times for each.
- [GitHub Actions Cron](https://opspane.dev/cron/github-actions/): Build on.schedule crontab entries for GitHub Actions with UTC conversion, minimum 5-minute warnings and copy-ready YAML.
- [systemd OnCalendar](https://opspane.dev/cron/systemd/): Test systemd OnCalendar expressions, convert between cron and systemd timers, and generate ready-to-use .timer and .service files.
