Cron Parser

Parse and explain cron expressions

Processed locally in your browser
Understanding Cron Expressions
TL;DR

A cron expression is a time-based scheduling syntax using 5 fields (minute, hour, day of month, month, day of week) to define when a task should run. Originally from Unix, cron is now used in CI/CD, cloud functions, container orchestration, and task schedulers worldwide.

What is a Cron Expression?

A cron expression is a string of five (or sometimes six) fields that defines a recurring schedule. Each field represents a time unit, and together they specify exactly when a command or job should execute. Cron is the de facto standard for time-based job scheduling across operating systems, cloud platforms, and CI/CD pipelines.

The cron daemon continuously checks the current time against all registered cron expressions and executes matching jobs. This simple yet powerful system has been running scheduled tasks on Unix systems since 1979.

Cron Syntax: The 5 Fields

A standard cron expression consists of five fields separated by spaces:

┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-7, where 0 and 7 = Sunday)
│ │ │ │ │
* * * * *

Special Characters

CharacterMeaningExampleDescription
*Any value* * * * *Every minute
,List1,15 * * * *At minute 1 and 15
-Range0 9-17 * * *Every hour from 9 to 17
/Step*/10 * * * *Every 10 minutes

Common Patterns

ExpressionSchedule
0 * * * *Every hour (at minute 0)
0 0 * * *Every day at midnight
0 0 * * 0Every Sunday at midnight
0 0 1 * *First day of every month
0 0 1 1 *Once a year (January 1st)
*/15 * * * *Every 15 minutes
0 9 * * 1-5Weekdays at 9 AM
0 0 L * *Last day of every month (non-standard)

Common Use Cases

  • System maintenance: Log rotation, temporary file cleanup, database backups
  • CI/CD pipelines: Nightly builds, scheduled deployments, periodic security scans
  • Cloud functions: AWS EventBridge, Google Cloud Scheduler, Azure Timer Triggers all use cron syntax
  • Monitoring: Health checks, metric collection, alert threshold evaluation
  • Business processes: Report generation, email digest delivery, subscription renewals

Try These Examples

Every 5 Minutes Valid

Runs every 5 minutes, 24/7. The */5 in the minute field means 'every 5th minute' (0, 5, 10, 15, ...).

*/5 * * * *
Weekdays at 9 AM Valid

Runs at exactly 9:00 AM, Monday through Friday. Day-of-week field uses 1=Monday to 5=Friday.

0 9 * * 1-5
First Day of Every Month at Midnight Valid

Runs at midnight (00:00) on the first day of every month. Useful for monthly reports or billing.

0 0 1 * *
Invalid Expression Invalid

Only 4 fields provided. Standard cron requires exactly 5 fields (minute, hour, day of month, month, day of week).

*/5 * * *