Cron Calculator
Build a standard 5-field cron expression.
Building a five-field cron expression
A user crontab line has five time fields and then a command. The fields are minute, hour, day of month, month, and day of week. Star means every value. A number means that value. A range is inclusive. A step is a slash. 0 2 * * * is 02:00 every day. */15 * * * * is every 15 minutes. 0 9-17 * * 1-5 is the top of each working hour on Monday through Friday, where 0 and 7 are Sunday and 1 is Monday.
Day of month and day of week interact. If both are restricted, most cron daemons run the job when either matches, not only when both match. That surprises people who wanted the first Monday. If you need the first Monday, it is safer to run every Monday and let the command exit unless the day of the month is in the first seven days. The calculator builds the expression. It does not evaluate that OR rule for you.
The tool does not install a crontab. You still edit crontab -e or a file under /etc/cron.d. It does not know the timezone of the host. Cron uses the system zone unless the crontab sets CRON_TZ. It also does not expand nicknames such as @daily on every daemon the same way, so the five fields are the portable form.
Minutes are 0 through 59, hours 0 through 23, days 1 through 31, months 1 through 12. A field that is empty is not a star. Fill all five.
