This cheatsheet provides examples of managing cron jobs on Linux, including scheduling, editing, and troubleshooting automated tasks.
crontab -l
crontab -e
# m h dom mon dow command
* * * * * /path/to/script.sh
0 2 * * * /path/to/daily-backup.sh
0 3 * * 0 /path/to/weekly-report.sh
0 4 1 * * /path/to/monthly-cleanup.sh
30 5 15 6 * /path/to/special-task.sh
sudo cat /etc/crontab
* * * * * /path/to/script.sh >> /var/log/cron.log 2>&1