# Cron Expression Explainer

> Type a cron schedule in standard, Quartz or AWS syntax and read what it means in plain English, with each field expanded, the next runs in any time zone and ready snippets.

- Page: https://codethatmoves.com/tools/dev/cron-expression-explainer/
- Site: Code That Moves
- Category: Developer tools
- Free, runs in the browser, nothing is uploaded
- Last checked: 2026-11-03

## What it does

- Three syntaxes: standard five-field cron, Quartz (seconds, optional year) and AWS EventBridge (year field, cron() wrapper)
- Quartz and AWS special characters: ? for no specific value, L, L-n and LW for the end of the month, nW for the nearest weekday, nL for the last weekday of a kind and n#k for the nth one
- Expands each field: lists, ranges, steps, month and weekday names, and highlights the field under the cursor
- A generator for standard cron: pick every, every n, a list or a range for each field and the expression is written for you
- The next 5, 10 or 25 run times in any IANA time zone, searchable, starting from your own; daylight saving gaps are handled, and the list can be copied
- Applies the standard cron rule that day of month and day of week match either way when both are set
- Ready snippets for GitHub Actions, a Kubernetes CronJob with timeZone and systemd OnCalendar, with a plain note when a schedule cannot be written in one of them; a step after a single value such as 5/15 is rewritten as the portable 5-59/15
- Presets per syntax and a share link with the expression, syntax and time zone in the URL

## How to use it

1. Pick the syntax: standard cron, Quartz or AWS EventBridge. Then type or paste the expression, pick a preset, or open the generator and choose a rule per field.
2. Read the meaning and the expanded values of each field. Errors name the field and the rule that failed.
3. Choose the time zone the job runs in to see the next run times, then copy a snippet, the meaning or a share link.

## What it checks and why

A cron expression has five fields separated by spaces: minute (0 to 59), hour (0 to 23), day of month (1 to 31), month (1 to 12) and day of week (0 to 7, where both 0 and 7 are Sunday). A field can be *, a number, a list with commas, a range with a dash, or a step such as */15. Months and weekdays also take three-letter names like jan or mon.

One rule surprises people. When both the day of month and the day of week are restricted, cron runs the job when either matches, not both. The crontab manual's own example, 30 4 1,15 * 5, runs at 04:30 on the 1st and 15th of every month and also on every Friday. The explainer and the next-run list follow that rule.

The parser follows the crontab(5) manual used by Vixie cron and cronie on Linux, which also defines the @hourly, @daily, @weekly, @monthly, @yearly and @reboot nicknames. The POSIX crontab specification has the same five fields.

Quartz puts a seconds field first and allows an optional year (1970 to 2099) last. Its day of week runs 1 to 7 or SUN to SAT, so 1 is Sunday, not Monday. Its documentation says support for setting both day fields is not complete, so one of them must be ?. L means the last day (L-3 is the third to last, LW the last weekday), 15W the weekday nearest the 15th within the same month, 6L the last Friday and 6#3 the third Friday.

AWS EventBridge uses six fields: minutes, hours, day of month, month, day of week and a year from 1970 to 2199, usually wrapped as cron(...). It has the same ?, L, W and # as Quartz, does not accept values in both day fields (* in one needs ? in the other), allows one expression only when # is used, and cannot run more often than once a minute. Scheduled rules run in UTC; EventBridge Scheduler can evaluate a schedule in a time zone you choose.

Where a job runs changes the time zone. GitHub Actions runs schedules in UTC unless the workflow sets timezone, only on the default branch and at most every 5 minutes. A Kubernetes CronJob uses the controller's local zone unless spec.timeZone is set (stable since 1.27). A systemd timer can name a zone at the end of OnCalendar=.

## Specs and sources

- [crontab(5) manual page (man7.org)](https://man7.org/linux/man-pages/man5/crontab.5.html)
- [POSIX: crontab](https://pubs.opengroup.org/onlinepubs/9799919799/utilities/crontab.html)
- [Quartz Scheduler: CronTrigger tutorial](https://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html)
- [AWS: EventBridge scheduled rule cron expressions](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-scheduled-rule-pattern.html)
- [AWS: EventBridge Scheduler schedule types and time zones](https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html)
- [GitHub Docs: schedule event](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#schedule)
- [Kubernetes: CronJob (schedule syntax and time zones)](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/)
- [systemd.time(7): calendar events](https://www.freedesktop.org/software/systemd/man/latest/systemd.time.html)

## Limits

- Spring's six-field cron and other dialects are not separate modes; check their own documentation before reusing a Quartz expression there.
- Next runs skip wall times that a daylight saving jump removes and run repeated times once, at the first occurrence. That matches EventBridge Scheduler's documented behaviour; cron daemons differ, and Vixie cron, for example, has its own rules for jobs near the change.
- Next runs search up to five years ahead, or across the years the expression allows.
- Like Vixie cron, a standard day field that starts with * (such as */2) counts as unrestricted for the either-day rule, so */2 with 1-5 means days that match both.
- The generator writes standard five-field cron only. For Quartz and AWS, start from a preset and edit the text.
- Snippets need a five-field form, so Quartz seconds, year limits and L, W or # are not carried to GitHub or Kubernetes. systemd has no nearest-weekday rule, so W is reported as not expressible.

## Questions

### What does */5 * * * * mean?

Every 5 minutes: at minute 0, 5, 10 and so on up to 55, every hour of every day.

### How do I run a cron job every weekday at 9 am?

Use 0 9 * * 1-5: minute 0, hour 9, any day of month, any month, Monday (1) to Friday (5).

### Is Sunday 0 or 7 in cron?

Both. The crontab manual accepts 0 or 7 for Sunday, or the three-letter name sun, in the day of week field.

### Why does my cron run on more days than I expected?

If you set both the day of month and the day of week, cron runs when either one matches. Leave one of them as * to make the other the only condition.

### What time zone does cron use?

Usually the time zone of the machine that runs the cron daemon. GitHub Actions uses UTC by default and AWS EventBridge rules use UTC. Pick the zone the job runs in from the list to see the right next runs.

### Does it support a seconds field?

Yes, in Quartz mode, where seconds come first. Standard cron has five fields and the smallest step is one minute; AWS EventBridge also has no seconds field.

### How do I run a cron job every 2 days?

Use 0 0 */2 * * for midnight on every 2nd day of the month: the 1st, 3rd, 5th and so on. The count restarts each month, so after the 31st the next run is the 1st, one day later. For an exact 48-hour interval, use a timer that tracks the last run instead of cron.

### What does ? mean in a cron expression?

No specific value. Quartz and AWS use it in either day of month or day of week, whichever you do not want to set, because they do not accept values in both.

### Why does my AWS cron expression have six fields?

AWS EventBridge adds a year field at the end and has no seconds field, so cron(0 10 * * ? *) means 10:00 UTC every day.

### Can GitHub Actions run a schedule every minute?

No. GitHub's documentation says the shortest interval is once every 5 minutes, and scheduled runs can be delayed when GitHub is busy.
