What is a Cron Expression?
A cron expression is a string of 5 (or 6) fields that defines a schedule for recurring tasks on Unix/Linux systems. The fields represent: Minute (0–59), Hour (0–23), Day of Month (1–31), Month (1–12), and Day of Week (0–7, where 0 and 7 are both Sunday).
Special characters: * (every), - (range), , (list), / (step). For example, */5 * * * * means "every 5 minutes."
FAQ
How do I run a task every 5 minutes?
Use */5 * * * *. The */5 in the minute field means "every 5th minute" (0, 5, 10, 15, … 55).
What does 0 0 * * 1-5 mean?
This runs at midnight (00:00) every weekday (Monday through Friday). 1-5 in the day-of-week field is a range from Monday (1) to Friday (5).