# Crontab in plain English: Unix, GitHub Actions, Kubernetes, Quartz

> Online cron parser free with natural language explanation, weekly visualizer and next 20 runs in a timezone of your choice. Supports POSIX 5-field, Quartz 6-field (seconds), @daily aliases, GitHub Actions, Kubernetes CronJob.

Free in-browser tool (no upload): https://www.mauriziofonte.it/tools/cron-expression-parser

Parser for **cron expressions** POSIX 5-field (`min hour dom mon dow`) + **aliases** (`@yearly`, `@monthly`, `@weekly`, `@daily`, `@hourly`) + natural language explanation + weekly visualizer (7 days x 24 hours matrix) + next 20 runs list. Supports standard Unix + AWS EventBridge + GitHub Actions + Kubernetes CronJob syntax. Fully.

## How to use the parser

1. **Standard 5-field syntax** - `minute hour dayOfMonth month dayOfWeek`. Range: minute 0-59, hour 0-23, day of month 1-31, month 1-12 (or JAN-DEC), day of week 0-6 (0=Sunday, or SUN-SAT). Operators: `*` (any), `,` (list: 1,3,5), `-` (range: 1-5), `/` (step: */15).
2. **Aliases** - `@yearly` = 0 0 1 1 *, `@monthly` = 0 0 1 * *, `@weekly` = 0 0 * * 0, `@daily` = 0 0 * * *, `@hourly` = 0 * * * *. Non-standard but widespread (Unix, Vixie cron, AWS EventBridge).
3. **Weekly visualizer** - Matrix 7 days (mon-sun) x 24 hours. Active cells highlighted in blue. For high-frequency cron (e.g. `* * * * *` every minute) the matrix is fully blue.
4. **Next runs** - List of the next 20 runs starting now. Useful to validate at a glance: '0 9 * * 1-5' = every weekday at 9:00, the times in the list confirm the pattern.

## Cron expressions: what this parser checks

**POSIX 5-field syntax.** Unix standard since 1976 (V7). 5 space-separated fields: minute, hour, day of month, month, day of week. Operators: `*` (any value), `,` (value list), `-` (inclusive range), `/` (step). Example: `*/15 9-17 * * 1-5` = every 15 minutes from 9 to 17, mon-fri.

**Differences across dialects.** POSIX standard (Vixie cron Linux) uses 5 fields. AWS EventBridge uses 6 fields (adds optional year). Quartz Java uses 6-7 fields (adds seconds and year). The parser handles standard 5-field and Quartz 6-field (leading seconds), with `?` support (Quartz/AWS-style mutual exclusion of day-of-month / day-of-week). AWS EventBridge's 6-field form (trailing year) is not supported: with 6 fields the first one is always read as seconds.

**Aliases.** Vixie cron (Linux standard) supports non-POSIX aliases: `@yearly` / `@annually` / `@monthly` / `@weekly` / `@daily` (alias of `@midnight`) / `@hourly` / `@reboot` (runs at system startup, NOT handled by parser because it has no temporal schedule). The parser expands aliases internally before computation.

**Scope caveat.** Next runs are computed in the selected timezone (local, UTC, Europe/Rome, America/New_York, Asia/Tokyo) with DST handled via the browser's Intl API. For a timezone not in the list, or for rigorous debugging: `crontab -l` on the actual server and `cron-utils` in Java / `croniter` in Python with an explicit timezone.

## Glossary

- **Cron**: Unix daemon for recurring job scheduling. Invented by Brian Kernighan, AT&T Bell Labs, 1975. Modern version: Vixie cron (1987) used on Linux/BSD.
- **Crontab**: Cron daemon configuration file. `crontab -e` to edit, `crontab -l` to list. Syntax: one line per job, 5-field format + command.
- **Vixie cron**: Paul Vixie's cron implementation (1987), Linux/BSD standard. Supports aliases (@yearly, @hourly, @reboot), specific user execution (/etc/cron.d/), month/weekday names (JAN, MON, etc).
- **AWS EventBridge cron**: AWS variant with 6 fields: minute hour dayOfMonth month dayOfWeek year. Year is optional (range 1970-2199). Supports `?` for mutual exclusion between dayOfMonth and dayOfWeek.
- **Quartz cron**: Java Quartz variant with 6-7 fields: seconds minute hour dayOfMonth month dayOfWeek year. Various advanced operators (L, W, #) for last day of month, last weekday, nth weekday.
- **Step operator**: Operator `/` for regular repetition. `*/15` = every 15 starting from 0 (0, 15, 30, 45). `5/10` = every 10 starting from 5 (5, 15, 25...).

## Frequently asked questions about cron

### Is 0 0 * * 7 the same as 0 0 * * 0?

Yes. Both 0 (Sunday) and 7 (also Sunday) represent the same day of week in Vixie cron. Historical convention to accommodate different traditions (US: 0=Sun, ISO: 7=Sun).

### How do I do 'every 30 minutes' starting at 9:15?

`15,45 * * * *` = at minutes 15 and 45 of every hour. The step `*/30` would start from 0, 30 - not from 15. For specific offsets: explicit list.

### Does cron support sub-minute executions (every N seconds)?

No. POSIX cron is minute-based. For more frequent runs: use systemd timer (modern Linux), or a script `while true; do...; sleep 30; done`. AWS Step Functions / Cloud Scheduler GCP support sub-minute with different syntax.

### Difference @reboot vs temporal scheduling?

`@reboot` runs the job once at cron daemon startup (typically system boot), then never again until the next reboot. NO recurring temporal scheduling. The parser doesn't compute 'next run' for `@reboot` because it depends on when the machine restarts.

### Does GitHub Actions accept cron syntax?

Yes, standard POSIX 5-field. Example: `schedule: - cron: '0 6 * * 1'`. Caveat: GitHub Actions cron has +-5 minute precision for fairness, and jobs can be skipped during high scheduler utilization. For strict timing: use workflow_dispatch or webhook.

### Can I test 'every first Monday' of the month?

Not with standard POSIX syntax. Hack: `0 9 1-7 * 1` = every Monday of the first week of the month (i.e. the first Monday). Works because in the first 7 days of the month exactly one Monday falls. Quartz cron supports `1#1` = first Monday natively, POSIX doesn't.

### Are next runs in local timezone or UTC?

In the timezone you pick from the selector next to the results: browser local, UTC, Europe/Rome, America/New_York or Asia/Tokyo, with DST handled automatically. For a timezone not in the list: in production use an explicit timezone in the cron daemon (Linux: `CRON_TZ=Europe/Rome` in crontab).

---
Tool by Maurizio Fonte, senior backend engineer. All tools: https://www.mauriziofonte.it/tools/
