The Ultimate Guide to Cron Expressions
A cron expression is a string comprising five or six fields separated by white space that represents a set of times at which a system task should run.
Expression Structure
The standard fields are Minute, Hour, Day of Month, Month, and Day of Week. Special characters are used to define frequencies:
- * (Wildcard): Specifies all values (e.g., * in the minute field runs every minute).
- / (Step): Specifies increments (e.g., */15 runs every 15 minutes).
- , (List): Specifies multiple specific values (e.g., 1,2,3).
- - (Range): Specifies a range of values (e.g., 1-5 runs on those values inclusive).