DevOps

Cron Expression Guide: Syntax, Examples & Scheduling Best Practices

Complete reference for crontab syntax, special characters (*, /, -, ,), and cron job automation across Linux, GitHub Actions, and AWS.

August 28, 2026
11 min read
Cron Expression Guide: Syntax, Examples & Scheduling Best Practices

Mastering Cron Job Scheduling and Crontab Syntax

⏰ Build & Verify Cron Schedules Visually

Generate, decode, and test 5-part cron expressions with plain English explanations and upcoming execution timestamps using our Cron Expression Builder.

From scheduled database backups and automated email newsletters to telemetry scraping and cleanup jobs, cron is the foundational automation backbone of Unix-like operating systems and modern cloud platforms.

1. The 5-Field Standard Cron Format

A standard POSIX cron expression contains five whitespace-delimited fields:

┌───────────── Minute (0 - 59)
│ ┌─────────── Hour (0 - 23)
│ │ ┌───────── Day of Month (1 - 31)
│ │ │ ┌─────── Month (1 - 12)
│ │ │ │ ┌───── Day of Week (0 - 6, 0 = Sunday)
│ │ │ │ │
* * * * *

2. Special Characters Explained

  • Asterisk (*): Wildcard representing every possible value in that field. * * * * * executes every minute of every hour, every day.
  • Comma (,): Value list separator. 15,45 * * * * executes at minute 15 and minute 45 of each hour.
  • Hyphen (-): Inclusive value range. 0 9 * * 1-5 executes at 9:00 AM Monday through Friday.
  • Slash (/): Step interval. */15 * * * * executes every 15 minutes (0, 15, 30, 45).

3. Cheat Sheet: 10 Most Common Cron Schedules

Expression Human Schedule Typical Use Case
*/5 * * * * Every 5 minutes Health checks & ping monitoring
0 * * * * Top of every hour Hourly aggregation & cache warming
0 0 * * * Daily at midnight (00:00) Daily database backup & log rollover
0 9 * * 1-5 Weekdays at 9:00 AM Business digest & Slack notifications
0 0 1 * * 1st of every month at 00:00 Monthly invoicing & billing runs