Cron expression generator and next-run preview
Write a cron schedule or pick a preset, and see exactly when it will run next. Standard five-field syntax, as used by crontab on Linux servers.
The five fields
- Minute (0 to 59), hour (0 to 23), day of month (1 to 31), month (1 to 12) and day of week (0 to 7, where 0 and 7 are Sunday).
- * means every value, a comma makes a list (1,15), a dash a range (9-17) and a slash a step (*/10).
- Names work too: jan to dec for months and sun to sat for weekdays.
Day of month and day of week
When both fields are restricted, cron runs the job when either one matches. 0 0 1 * 1 runs on the 1st of the month and on every Monday. When one of them is *, only the other one counts.
Good habits
- Cron uses the time zone of the server. Servers are usually set to UTC, so check with the UTC option above.
- Redirect output to a log, for example >> /var/log/job.log 2>&1, or you will never see an error.
- Use full paths to programs. Cron has a much smaller PATH than your shell.