All posts
May 8, 20265 min read

Cron expressions explained with 12 real examples

Cron has scheduled jobs on Unix systems since the 1970s, and the same five field syntax now runs CI pipelines, Kubernetes CronJobs, and serverless schedules. Five fields, left to right: minute, hour, day of month, month, day of week.

Examples you can copy

  • * * * * * : every minute
  • */5 * * * * : every 5 minutes
  • 0 * * * * : every hour, on the hour
  • 0 0 * * * : every day at midnight
  • 0 9 * * * : every day at 09:00
  • 0 9 * * 1-5 : weekdays at 09:00
  • 0 0 * * 0 : every Sunday at midnight
  • 0 0 1 * * : first day of every month
  • 0 0 1 1,4,7,10 * : quarterly, first day at midnight
  • 30 8 * * 1 : Mondays at 08:30
  • 0 */6 * * * : every 6 hours
  • 15 2 * * 6 : Saturdays at 02:15, a classic backup window
Build and preview a cron scheduleBuild cron expressions from presets, see them explained in plain English, and preview the next run times.

The day-of-week trap

When both the day of month and day of week fields are set, standard cron runs the job when either matches, not both. 0 0 13 * 5 does not mean Friday the 13th; it runs on every 13th and every Friday. This is the single most common cron surprise, and the reason to always preview the next run times before deploying a schedule.

Timezones

A cron expression has no timezone. The system running it decides, and on servers and CI that is usually UTC. A job scheduled for 0 9 * * * runs at 09:00 UTC, which is 4am in New York and 2:30pm in Mumbai. Check what timezone your scheduler uses before assuming the job runs during your morning.