Developer Tools8 min read20 March 2026

Understanding Cron Expressions — Complete Guide with Examples

Cron expressions explained from scratch. Learn the 5-field syntax, special characters, and real examples for scheduling daily, weekly, and monthly jobs in Linux, AWS, and GitHub Actions.

If you work with Linux servers, CI/CD pipelines, AWS EventBridge, or any kind of task scheduling, you will encounter cron expressions. They look cryptic at first (0 9 * * 1-5) but follow a simple pattern once you understand the five fields.

Try it free — no signup required

Cron Expression Builder

Open tool →

The 5-Field Cron Syntax

┌─── Minute (0-59)
│ ┌─── Hour (0-23)
│ │ ┌─── Day of month (1-31)
│ │ │ ┌─── Month (1-12 or JAN-DEC)
│ │ │ │ ┌─── Day of week (0-6 or SUN-SAT)
│ │ │ │ │
* * * * *

Special Characters

* (asterisk) — every

* in a field means "every valid value". * * * * * runs every minute of every hour of every day.

, (comma) — multiple values

0 9,17 * * * runs at 9am AND 5pm daily.

- (hyphen) — range

0 9 * * 1-5 runs at 9am, Monday through Friday.

/ (slash) — step

*/15 * * * * runs every 15 minutes. 0 */6 * * * runs every 6 hours.

Common Cron Examples

# Every minute
* * * * *

# Every hour at :00
0 * * * *

# Every day at midnight
0 0 * * *

# Every day at 9am
0 9 * * *

# Every weekday (Mon-Fri) at 9am
0 9 * * 1-5

# Every Monday at 8am
0 8 * * 1

# Every 15 minutes
*/15 * * * *

# Every 6 hours
0 */6 * * *

# First day of every month at midnight
0 0 1 * *

# Every Sunday at 2am (good for weekly backups)
0 2 * * 0

# January 1st at midnight (New Year's Day)
0 0 1 1 *

Cron in Different Systems

Linux crontab

Edit with crontab -e. Standard 5-field format.

AWS EventBridge (CloudWatch Events)

Uses a 6-field format with seconds: 0 9 ? * MON-FRI *. Note: ? is used instead of * for day fields to avoid conflicts.

GitHub Actions

on:
  schedule:
    - cron: '0 9 * * 1-5'  # Weekdays at 9am UTC

All cron times are in UTC by default on most systems. Add your timezone offset or use a timezone-aware scheduler.

How to Build and Test Cron Expressions

The EazyTools Cron Expression Builder lets you create cron expressions visually and see a human-readable description of when they will run — no more guessing.

Try it free — no signup required

Cron Expression Builder

Open tool →
← All articlesOpen Cron Expression Builder