Skip to content

Cron Expressions

Ptah uses croner for parsing and scheduling. It accepts standard 5- or 6-field expressions; the second-of-minute field is optional.

┌───────────── second (optional, 0–59)
│ ┌─────────── minute (0–59)
│ │ ┌───────── hour (0–23)
│ │ │ ┌─────── day of month (1–31)
│ │ │ │ ┌───── month (1–12 or JAN–DEC)
│ │ │ │ │ ┌─── day of week (0–7 or SUN–SAT, 0 and 7 are Sunday)
│ │ │ │ │ │
* * * * * *
ExpressionMeaning
* * * * *Every minute
0 * * * *Top of every hour
*/15 * * * *Every 15 minutes
0 9 * * MON-FRI9:00 every weekday
0 0 * * SUNMidnight every Sunday
0 0 1 * *First of every month, midnight
0 9 1 1 *9:00 on January 1st
30 2 * * *2:30 every day

Pair every expression with an IANA timezone. 0 9 * * MON-FRI in America/New_York and the same expression in Asia/Tokyo fire at very different absolute times — be explicit.

If you’re unsure what zone string to use, the IANA tzdb list is canonical.