Cron syntax: how to actually read those five fields
Cron expressions look cryptic until you know the five fields are read right to left in a specific order. After that, they're genuinely simple.
A cron expression is five fields separated by spaces, each representing a unit of time, in a fixed order: minute, hour, day of month, month, day of week. Once that order is memorized, most expressions become readable at a glance instead of needing to be looked up every time.
The five fields
┌───────────── minute (0-59) │ ┌───────────── hour (0-23) │ │ ┌───────────── day of month (1-31) │ │ │ ┌───────────── month (1-12) │ │ │ │ ┌───────────── day of week (0-6, Sunday=0) │ │ │ │ │ * * * * *
The symbols that do the actual work
- * — matches every value in that field ("every minute", "every day", etc.)
- , — a list of specific values, like 1,15 for the 1st and 15th
- - — a range, like 9-17 for 9am through 5pm
- / — a step value, like */15 in the minute field for "every 15 minutes"
A few expressions worth memorizing by sight
0 * * * * → every hour, on the hour 0 0 * * * → every day at midnight */15 * * * * → every 15 minutes 0 9 * * 1-5 → 9am, Monday through Friday 0 0 1 * * → midnight on the 1st of every month
The mistake that trips people up most
Day of month and day of week are both present, and when both are restricted (not *), most cron implementations treat them as OR, not AND — the job runs if either condition matches, not only when both do. This surprises people writing something like "the 1st of the month, but only if it's a Monday," which cron syntax alone can't actually express; that kind of combined condition needs to be handled in the job itself, not the schedule.
Processa's cron parser translates an expression into a plain-English description and shows the next several run times, which is a faster way to sanity-check a schedule than mentally parsing five fields before deploying it.
More from the blog
Understanding JWTs: what's actually inside that token
JWTs look like gibberish but they're just three pieces of base64. Here's how to actually read one, and the security mistakes to avoid.
DevRegex patterns every developer ends up needing
You don't need to memorize regex. You need to recognize the handful of patterns that cover 90% of real use cases.
Get new posts by email
We write practical guides on file processing, developer tools and product updates.
No spam. Unsubscribe any time.