cron
Installation
SKILL.md
Identity
- Daemon:
cron(Debian/Ubuntu) orcrond(RHEL/Fedora/Arch) - Unit:
cron.service(Debian/Ubuntu) orcrond.service(RHEL/Fedora) - User crontabs:
crontab -e— stored in/var/spool/cron/crontabs/<user> - System crontab:
/etc/crontab— includes a username field; read by cron directly - Drop-in dir:
/etc/cron.d/— same syntax as/etc/crontab(username field required) - Run-parts dirs:
/etc/cron.hourly/,/etc/cron.daily/,/etc/cron.weekly/,/etc/cron.monthly/ - Logs:
journalctl -u cronorjournalctl -u crond; also/var/log/syslog(Debian) or/var/log/cron(RHEL) - Distro install:
apt install cron/dnf install cronie
Key Operations
| Operation | Command |
|---|---|
| List current user's crontab | crontab -l |
| Edit current user's crontab | crontab -e |
| Edit another user's crontab (root) | crontab -u username -e |
| List another user's crontab (root) | crontab -u username -l |
| Remove current user's crontab | crontab -r |
Related skills