About cron expression generator / parser
A cron expression tells a scheduler when to run a job. It has five fields: minute, hour, day of month, month and day of week.
Examples
- 0 9 * * 1-5 runs at 09:00 on weekdays.
- */15 * * * * runs every 15 minutes.
- 0 0 1 * * runs at midnight on the first of each month.
Remember the time zone
Cron runs in the server's time zone, which is often UTC. India is UTC+5:30, so 9:00 AM IST is 03:30 UTC.
A worked example
*/15 9-17 * * 1-5 runs every 15 minutes during the hours 9 to 17 on weekdays, so the last run is at 17:45. 0 2 * * 0 runs at 2:00 AM every Sunday, where 0 means Sunday. The tool also explains any expression in plain words.
Common mistakes
- Forgetting that day of month and day of week are combined in some systems with 'or' rather than 'and'.
- Scheduling in the wrong time zone.
- Running heavy jobs at the same minute as many others, instead of offsetting them.
