UtilX

Cron Syntax Guide: How Cron Expressions Work

Cron expressions schedule recurring jobs on Unix systems, in CI/CD pipelines (GitHub Actions, GitLab CI), and in task schedulers like Kubernetes CronJobs. They look cryptic but follow a fixed, learnable pattern.

The five fields

FieldAllowed values
Minute0-59
Hour0-23
Day of month1-31
Month1-12
Day of week0-6 (0 = Sunday)

Read left to right: minute hour day-of-month month day-of-week.

Special characters

SymbolMeaning
*Every value (no restriction)
,A list, e.g. 1,15 means the 1st and 15th
-A range, e.g. 1-5 means Monday through Friday
/A step, e.g. */15 means every 15 units

Common examples

ExpressionMeaning
0 9 * * 1-59:00 AM, Monday through Friday
*/15 * * * *Every 15 minutes
0 0 1 * *Midnight on the 1st of every month
0 0 * * 0Midnight every Sunday
0 */6 * * *Every 6 hours, on the hour

Common gotcha: time zones

Cron itself has no concept of time zones — it runs in whatever time zone the host system (or CI runner) is configured for. Always check your platform's docs; GitHub Actions, for example, runs scheduled workflows in UTC regardless of your repo's location.

Try it yourself

Use the Cron Expression Builder to build a schedule with dropdowns, or paste in an existing expression to get a plain-English explanation.