What is a cron expression?
A cron expression is a string of five fields separated by spaces that defines a schedule for automated tasks on Unix-like systems. Originally part of the cron daemon in Unix, the format has become the de facto standard for scheduling across virtually every platform — from Linux servers and CI/CD pipelines to cloud services like AWS CloudWatch, Google Cloud Scheduler, and Azure Functions.
Each of the five fields represents a time unit: minute, hour, day of the month, month, and day of the week. Together, they define precisely when a task should execute. The expression 30 9 * * 1-5 means "at 9:30 AM on every weekday," while 0 0 1 */3 * means "at midnight on the first day of every third month."
Common cron patterns explained
The most frequently searched cron expressions tend to follow a handful of patterns. Understanding these covers the vast majority of real-world scheduling needs.
Running at a fixed time daily — set the minute and hour fields to specific values and leave the rest as wildcards. The expression 0 6 * * * runs at 6:00 AM every day. This is by far the most common pattern for backup scripts, report generation, and log rotation.
Running every N minutes — use the step operator in the minute field. */5 * * * * runs every 5 minutes, and */15 * * * * every 15 minutes. These are typical for health checks, queue polling, and cache warming.
Weekday-only schedules — restrict the day-of-week field using a range. 0 9 * * 1-5 runs at 9 AM Monday through Friday. Useful for business-hours tasks like Slack notifications, standup reminders, and deployment windows.
Monthly tasks — set the day-of-month field. 0 0 1 * * runs at midnight on the first of every month. Common for billing cycles, monthly reports, and certificate renewal checks.
Cron in different environments
While the five-field format is universal, some platforms extend it. AWS EventBridge uses a sixth field for year and supports the ? wildcard. GitHub Actions uses standard five-field cron but runs in UTC. Kubernetes CronJobs follow the standard format but add timezone configuration via .spec.timeZone. This tool parses the standard five-field format, which is compatible with all major platforms.