ToolsCourt
BlogWhat Is a Cron Expression? Complete Beginner Guide
Dev8 min read·January 2025

What Is a Cron Expression? Complete Beginner Guide

Learn cron syntax from scratch — all 5 fields, special characters, and 50 real examples you can copy.

Try the free tool
No signup. Runs in your browser. Takes 10 seconds.
Open Cron Generator

The One-Line Answer

A cron expression is a 5-field text string that tells a computer when to run a task automatically. Example: 0 9 * * 1-5 means "run at 9:00 AM every Monday through Friday."

The 5 Fields — Memorise This

┌─────── minute (0-59)
│ ┌───── hour (0-23)
│ │ ┌─── day of month (1-31)
│ │ │ ┌─ month (1-12)
│ │ │ │ ┌ day of week (0-6, 0=Sunday)
│ │ │ │ │
* * * * *
💡 Memory trick: Minutes Hour DOM Month DOW — "My Housemate Does Monthly Dishes"

Special Characters

  • * — every value (wildcard)
  • */5 — every 5th value (step)
  • 1-5 — range from 1 to 5
  • 1,3,5 — specific values (list)

20 Examples to Get You Started

ExpressionMeaning
* * * * *Every minute
*/5 * * * *Every 5 minutes
0 * * * *Every hour
0 9 * * *Every day at 9am
0 9 * * 1-5Weekdays at 9am
0 0 * * *Every midnight
0 0 1 * *First of every month
0 0 * * 0Every Sunday midnight
*/15 * * * *Every 15 minutes
30 8 * * 1Every Monday 8:30am

The Most Common Mistake

*/5 does NOT mean "every 5 minutes from now." It means "every minute whose value is divisible by 5" — which is always 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55. Cron is absolute, not relative.

Timezone Warning for GitHub Actions

GitHub Actions cron always runs in UTC. India is UTC+5:30, so 0 9 * * * on GitHub Actions fires at 2:30 PM IST, not 9 AM. To run at 9 AM IST, use 30 3 * * *.

💡 Use the ToolsCourt Cron Generator to build any expression visually and see exactly when it will next run, shown in Indian time.
Ready to try it?
Free, instant, no signup required.
Open Cron Generator Free →