croncron expressioncron readerscheduled taskscron syntax

Cron Expressions Explained: How to Read Any Cron Schedule

Cron is how Unix systems schedule jobs. Learn the five fields of a cron expression, what the special characters mean, and how to read any schedule in seconds.

9 min read

Related Tool

Cron Expression Reader

Open tool

Cron is a time-based job scheduling system found on virtually every Unix and Linux server. A cron expression is a compact string that defines when a job should run. Once you understand the five fields, you can read any cron expression at a glance and write new ones in seconds.

The Five Fields

A standard cron expression has five space-separated fields read from left to right: minute, hour, day of month, month, and day of week.

The minute field accepts values from 0 to 59. The hour field accepts values from 0 to 23. The day of month field accepts values from 1 to 31. The month field accepts values from 1 to 12 (or the abbreviated month names). The day of week field accepts values from 0 to 7, where both 0 and 7 represent Sunday (or use the abbreviated day names).

Special Characters

An asterisk means "every valid value". A five-asterisk expression (* * * * *) means run every minute of every hour of every day.

A comma separates multiple specific values. The hour field value 9,12,18 means run at 9 AM, noon, and 6 PM.

A hyphen defines a range. The day-of-week value 1-5 means Monday through Friday.

A forward slash defines a step. The minute value 0/15 means starting at minute 0 and every 15 minutes after that (0, 15, 30, 45). The notation */15 is shorthand for the same thing.

Reading Common Expressions

The expression 0 9 * * 1-5 runs at minute 0 of hour 9 (9:00 AM) on every day of the month, every month, on weekdays only. In plain English: every weekday at 9 AM.

The expression 30 2 1 * * runs at 2:30 AM on the 1st day of every month.

The expression 0 */6 * * * runs at minute 0, every 6 hours (midnight, 6 AM, noon, 6 PM), every day.

Using the DevHexLab Cron Reader

Open the tool at /tools/time/cron-reader. Paste any cron expression. The tool translates it to plain English and shows the next 5 scheduled run times so you can verify the schedule is correct before deploying it.

Frequently Asked Questions

What is the difference between cron and crontab?

Cron is the scheduling daemon. A crontab (cron table) is the file that contains the scheduled job definitions, one per line. Each line consists of a cron expression followed by the command to run.

Do AWS Lambda, GitHub Actions, and Kubernetes use standard cron?

They use variants. AWS EventBridge uses a 6-field cron with a year field. GitHub Actions uses standard 5-field cron with a UTC timezone. Kubernetes CronJob uses standard 5-field cron. The DevHexLab Cron Reader handles both 5-field and 6-field formats.

What does @ in a cron expression mean?

Some systems support shorthand macros like @daily (runs at midnight every day), @weekly (runs at midnight every Sunday), @monthly, and @hourly. These are syntactic sugar for common 5-field expressions.

Paste any cron expression into the reader and get the plain-English translation instantly.