Crontab Generator
Build a cron expression from simple choices or have any expression explained in plain English, with the next 5 runs.
Add this line to the file opened by crontab -e.
Next 5 runs
Cron follows the server's time zone; timedatectl shows yours.
How to read a cron expression
A crontab line has five fields followed by the command: minute (0-59), hour (0-23), day of month (1-31), month (1-12 or JAN-DEC) and day of week (0-7 or SUN-SAT; both 0 and 7 are Sunday). * means every value, */10 every tenth, 1-5 a range and 1,15 a list. Instead of the five fields you can write @daily, @weekly, @monthly, @hourly, or @reboot to run at every boot.
Adding it to crontab
crontab -e opens the current user's crontab; once you save, the job is live with no restart needed. crontab -l lists your jobs. sudo crontab -e edits root's crontab; use it only for jobs that need root (package updates, system backups). In /etc/crontab and files under /etc/cron.d/ a user name follows the five fields.
When a job does not run
Use full paths: cron runs with a very short PATH, so write /usr/bin/php rather than php, and /root/backup.sh for scripts. which php shows where a program lives. Log the output: append >> /var/log/backup.log 2>&1 so errors land in the file too. Mind the % sign: crontab treats % as a newline, so escape it as in date +\%F. Make the script executable: chmod +x /root/backup.sh.
The server's time zone counts
Cron runs on the server's time zone, not yours. If the server is on UTC, 0 3 * * * runs at 06:00 Istanbul time. timedatectl shows the zone; after sudo timedatectl set-timezone Europe/Istanbul restart the cron service (systemctl restart cron, or crond on AlmaLinux and Rocky).
Example: a nightly backup
30 3 * * * /root/backup.sh >> /var/log/backup.log 2>&1 runs the backup script every night at 03:30 and writes its output to a log. The script itself, pruning old backups and copying them to another server are covered step by step in our guide to automatic backups on a Linux server.
More free tools
FAQ
About Crontab Generator
If both are restricted, the job runs when either one matches. 0 9 1 * 1 does not mean the 1st AND a Monday; it runs on the 1st OR on any Monday. If one of the fields starts with *, only the other one matters. The tool warns you when this applies.
No, a minute is the smallest unit in cron. For anything more frequent use a systemd timer (OnUnitActiveSec=10s) or a service with its own loop. Six-field expressions with a seconds field belong to Quartz and Spring and do not work in crontab.
Cron logs every run to the system log: grep CRON /var/log/syslog on Ubuntu and Debian, /var/log/cron on AlmaLinux and Rocky, and journalctl -u cron (or crond) everywhere. To see the command's own output, append >> file.log 2>&1 to the line.