What is a cron expression?
A cron expression is a compact string that defines a schedule for recurring tasks — when to run a script, trigger a pipeline, send an email, or perform a database backup. The name comes from the Unix cron daemon, which reads these expressions to schedule jobs. A typical 5-field cron expression like "0 9 * * 1-5" means "at 9:00 AM on every weekday" — but reading that from the string alone requires knowing the field order and syntax, which is where the explainer comes in.
The 5-field standard cron syntax
Standard cron has five fields separated by spaces: minute (0–59), hour (0–23), day of month (1–31), month (1–12), day of week (0–7, where both 0 and 7 represent Sunday). An asterisk (*) means "every valid value". "0 9 * * 1-5" breaks down as: minute=0 (on the hour), hour=9 (9 AM), day-of-month=* (any day), month=* (any month), day-of-week=1-5 (Monday through Friday).
Special characters
The asterisk (*) matches every value. A comma (,) separates multiple values: "0,30 * * * *" runs at 0 and 30 minutes past every hour. A hyphen (-) defines a range: "1-5" means 1, 2, 3, 4, 5. A forward slash (/) defines a step: "*/15" means every 15 units (0, 15, 30, 45 for minutes). A question mark (?) is used in some implementations (Quartz, Spring) to mean "no specific value" for day-of-month or day-of-week when the other is specified.
Extended 6-field syntax
Many modern schedulers (AWS CloudWatch Events, Kubernetes CronJobs, GitHub Actions) use a 6-field format that prepends a seconds field: second, minute, hour, day-of-month, month, day-of-week. "0 0 9 * * 1-5" in 6-field format means the same as "0 9 * * 1-5" in 5-field format. Always check your scheduler's documentation to know which format it uses.
Common cron expressions
"* * * * *" — every minute. "0 * * * *" — every hour at :00. "0 0 * * *" — midnight every day. "0 0 * * 0" — midnight every Sunday. "0 0 1 * *" — midnight on the 1st of every month. "0 0 1 1 *" — midnight on January 1st (once per year). "*/5 * * * *" — every 5 minutes. "0 9-17 * * 1-5" — every hour from 9 AM to 5 PM, Monday through Friday.
The next run times feature
Verifying that a cron expression fires when you expect it to is difficult without running it. The explainer calculates the next 10 scheduled run times from the current moment, so you can immediately see whether "0 9 * * 1-5" fires on weekdays as intended, or whether "0 0 29 2 *" only runs in leap years (February 29).