Cron Syntax Explained

A cron expression has five fields (or six with seconds):

minute  hour  day-of-month  month  day-of-week
  *       *        *          *        *

Each field can be a specific value, a range, a list, or a step. The asterisk * means "every."

Field Ranges

  • Minute: 0-59
  • Hour: 0-23
  • Day of month: 1-31
  • Month: 1-12 (or JAN-DEC)
  • Day of week: 0-7 (0 and 7 are Sunday, or SUN-SAT)

Common Patterns

  • 0 * * * * — every hour at minute 0
  • */15 * * * * — every 15 minutes
  • 0 9 * * 1-5 — 9 AM on weekdays
  • 0 0 1 * * — midnight on the 1st of each month
  • 0 0 * * 0 — midnight every Sunday
  • 30 2 * * * — 2:30 AM daily (great for backups)

Build and Validate Cron Expressions

Use the Cron Builder on CodeKitLab to construct cron expressions visually — select minutes, hours, days, and see the expression update in real time. Already have an expression? The Crontab Validator validates it and shows the next 5 run times so you can confirm it does what you expect.

AI-Powered Explanations

Not sure what a complex cron expression does? Paste it into the AI Cron Explainer and get a human-readable description instantly.

Common Mistakes

  • Confusing day-of-week numbering (0=Sunday vs 1=Monday varies by system)
  • Using */5 in the hour field thinking it means "every 5 hours from now"
  • Forgetting that both day-of-month and day-of-week can trigger (OR logic in classic cron)
  • Not accounting for timezone differences on your server

Where Cron Is Used

Beyond traditional crontab, cron expressions appear in GitHub Actions, Kubernetes CronJobs, AWS EventBridge, and most CI/CD platforms. Master the syntax once, use it everywhere.

Cron-uttryck forklarade

Cron har fem falt: minut, timme, dag, manad, veckodag. Bygg uttryck med Cron Builder. Validera med Crontab Validator. Forklara med AI Cron Explainer.

Cron-Ausdrucke erklart

Cron hat funf Felder: Minute, Stunde, Tag, Monat, Wochentag. Erstellen Sie Ausdrucke mit dem Cron Builder. Validieren Sie mit dem Crontab Validator. Erklaren Sie mit dem AI Cron Explainer.

Expressions cron decodees

Cron a cinq champs : minute, heure, jour, mois, jour de semaine. Construisez des expressions avec le Cron Builder. Validez avec le Crontab Validator. Expliquez avec l'AI Cron Explainer.

Expresiones cron decodificadas

Cron tiene cinco campos: minuto, hora, dia, mes, dia de semana. Construye expresiones con el Cron Builder. Valida con el Crontab Validator. Explica con el AI Cron Explainer.

تعبيرات Cron مفكوكة

يحتوي Cron على خمسة حقول: الدقيقة والساعة واليوم والشهر ويوم الأسبوع. أنشئ التعبيرات باستخدام Cron Builder. تحقق باستخدام Crontab Validator. اشرح باستخدام AI Cron Explainer.

Cron ایکسپریشنز کی وضاحت

Cron کے پانچ فیلڈز ہیں: منٹ، گھنٹہ، دن، مہینہ، ہفتے کا دن۔ Cron Builder سے ایکسپریشنز بنائیں۔ Crontab Validator سے تصدیق کریں۔ AI Cron Explainer سے سمجھیں۔