Cron Job Management
Beginner5 min
Schedule, manage, and debug recurring tasks using cron and systemd timers for automated system maintenance.
Prerequisites
- -Linux shell access
Steps
1
List current user's cron jobs
View all scheduled tasks for the current user.
$ crontab -l
2
Edit the crontab
Open the crontab editor to add or modify scheduled tasks.
$ crontab -e
Cron format: minute hour day-of-month month day-of-week command. Use crontab.guru to verify expressions.
3
View system-wide cron jobs
Check for cron jobs defined in system directories.
$ ls -la /etc/cron.d/ /etc/cron.daily/ /etc/cron.hourly/ /etc/cron.weekly/ /etc/cron.monthly/ 2>/dev/null
4
List systemd timers (modern alternative)
View all scheduled timers managed by systemd.
$ systemctl list-timers --all
Systemd timers are more flexible than cron and can depend on other services, handle missed runs, and provide better logging.
Full Script
FAQ
Discussion
Loading comments...