Cron expressions are the universal backbone of scheduled automation across Unix, Linux, Kubernetes CronJobs, AWS EventBridge, and CI/CD pipelines. While powerful, remembering the position and special characters of the standard 5-field schedule often leads to subtle off-by-one errors.
Understanding the 5-Field Standard Crontab Structure
A standard POSIX cron expression consists of five space-separated fields representing distinct time units:
┌───────────── 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 Operators Explained
-
Asterisk (
*): Wildcard matching any allowed value for the field. -
Comma (
,): Specifies a list of distinct values (e.g.,1,15,30). -
Hyphen (
-): Specifies an inclusive range (e.g.,1-5for Monday through Friday). -
Slash (
/): Specifies step increments (e.g.,*/15for every 15 minutes).
Frequently Used Cron Expressions
-
0 0 * * *— Midnight every day (Daily rollover) -
0 */2 * * *— Every 2 hours on the hour -
*/15 9-17 * * 1-5— Every 15 minutes during standard business hours -
0 0 1 * *— First day of every month at midnight
Interactive Validation
Instead of guessing when your schedule triggers, you can parse, decode, and preview upcoming execution times client-side using the DevUtils Cron Parser Tool.