caduh

Cron expressions, decoded in 60 seconds

1 min read

A quick mental model to read and write cron schedules without Googling.

Cron has 5 fields: min hour day month weekday.

  • * means “every”
  • 0 9 * * 1-5 → 09:00 on weekdays
  • */15 * * * * → every 15 minutes
  • 0 0 1 * * → first of the month

Write it left→right: When in the hour? → Which hour? → Which day? → Which month? → Which weekday?