Cron Job Expression Generator & Explainer
Build cron expressions with a visual interface or paste an existing expression to get a plain-English explanation and next 10 scheduled run times.
cron-generator.tool
Cron Expression Format
A standard cron expression has five fields separated by spaces: minute (0-59), hour (0-23), day of month (1-31), month (1-12), and day of week (0-6, Sunday=0). The asterisk * means every value for that field. So 0 9 * * 1-5 means at 09:00, every weekday.
Special Characters
* — every value. */5 — every 5 units (step). 1-5 — range (Monday to Friday). 1,15 — list (1st and 15th). These can be combined: */15 9-17 * * 1-5 means every 15 minutes between 9am and 5pm on weekdays.
Frequently Asked Questions
Use the expression */5 * * * *. The */5 in the minute field means 'every 5 minutes'. The asterisks in the remaining fields mean 'every hour, every day, every month, every weekday'. To run every 15 minutes: */15 * * * *. Every 30 minutes: */30 * * * *.
Use 0 0 * * *. This means: at minute 0, hour 0 (midnight), every day of the month, every month, every day of the week. The system clock's timezone applies, so ensure your server timezone is set correctly. To check: timedatectl on systemd-based Linux.
Both schedule recurring tasks on Linux. Cron is older, simpler, and works on most systems. Systemd timers are more powerful: they can trigger on calendar times with more precision, survive reboots better, integrate with systemd logs, and handle missed runs (catch-up). For simple recurring scripts, cron is usually easier. For complex scheduling, systemd timers offer more control.
Common causes: incorrect path (cron has a minimal environment — use absolute paths for commands and files), wrong timezone (cron uses the system timezone), syntax error in the expression, the cron daemon is not running (check with systemctl status cron), or the script has no execute permission (chmod +x script.sh). Check /var/log/syslog or /var/log/cron for cron execution logs.
Standard cron has no 'last day' symbol. The common workaround is to use a command that checks the date: add a condition inside your script checking if tomorrow is the 1st. Some extended cron implementations (like Quartz) support the L symbol for last day, but standard Linux crontab does not.