1. What is cron?
cron is the Unix time-based scheduler and, by extension, the notation used to describe a schedule. Brian Kernighan designed it in 1975, and today Linux, macOS, BSD, Kubernetes CronJobs, GitHub Actions schedule:, AWS EventBridge Cron, Jenkins and countless other systems all reuse the same field syntax.
2. POSIX five fields
┌──────── minute 0-59 │ ┌────── hour 0-23 │ │ ┌──── day of month 1-31 │ │ │ ┌── month 1-12 or JAN-DEC │ │ │ │ ┌ day of week 0-6 (0 or 7 = Sunday) or SUN-SAT * * * * *
For example 0 9 * * 1-5 means minute=0, hour=9, any day of month, any month, Monday through Friday — so "weekdays at 9 AM on the dot".
3. Five operators
*— every value in the field.a,b,c— list.a-b— range.*/n— step. Combine with a range:0-30/5 * * * *.JAN..DEC,SUN..SAT— three-letter aliases.
4. Shortcut keywords
| Keyword | Equivalent |
|---|---|
@yearly | 0 0 1 1 * |
@monthly | 0 0 1 * * |
@weekly | 0 0 * * 0 |
@daily | 0 0 * * * |
@hourly | 0 * * * * |
5. Day-of-month and day-of-week both set: the trap
When both fields are restricted, Vixie/Linux cron treats them as OR (fire if either matches). Quartz (Java) treats them as AND. POSIX sides with OR. This tool follows POSIX. If you want a single condition, leave the other field as*.
6. Ten real-world schedules
0 9 * * 1-5— weekdays at 9 AM.*/15 * * * *— every 15 minutes.0 0 * * 0— weekly Sunday midnight.0 2 * * *— daily at 2 AM (traditional DB backup slot).0 0 1 * *— first of every month at midnight.30 18 * * 5— Friday 6:30 PM retro reminder.0 */6 * * *— every 6 hours.0 9,18 * * *— 9 AM and 6 PM daily.0 0 1 1 *— New Year midnight.- Split weekday 9 AM + weekend 10 AM into two separate entries.
7. Runtime quirks by platform
- Linux cron — uses the system timezone. Put
CRON_TZ=Asia/Seoulat the top of the crontab if the host is UTC. - Kubernetes CronJob — defaults to UTC. Set
spec.timeZone(Kubernetes 1.27+). - GitHub Actions — UTC only; there is no timezone override. Offset the expression instead.
- AWS EventBridge — six-field dialect with
?,L,W,#. Not drop-in compatible with POSIX. - Quartz — six or seven fields (seconds and optionally year), cannot specify day and weekday simultaneously.
8. Debugging checklist
- Paste the expression here and read the plain-language description first.
- Scan the next-10-runs table and make sure the cadence matches intent.
- Confirm whether production runs in KST or UTC — the 9-hour offset mistake is the most common one.
- Remember Vixie vs Quartz day/weekday OR-vs-AND semantics.
- If logs show nothing fired, check the cron daemon status (
systemctl status cron).
9. Scope of this tool
This release covers the POSIX 5-field syntax. Quartz seconds, L, W, #, AWS EventBridge 6-field and a dedicated GitHub Actions tab are on the roadmap.