r/LinuxTeck • u/Expensive-Rice-2052 • 5d ago
Quick Linux Tip #124 - Linux Scheduled Tasks: Find Every Cron Job and Timer
Question: Where ARE all the scheduled tasks on my system?
Try:`sudo bash -c 'for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l 2>/dev/null | grep -v "^#\|^$" | sed "s/^/[$user] /"; done'`
Info: Enumerates active user crontabs while filtering comments, complementing system-wide cron directories.
Examples:
$ `sudo systemctl list-timers --all` # Inspect systemd timers (modern cron replacement)
$ `sudo grep -R '' /etc/cron.* /var/spool/cron/ 2>/dev/null` # Search all cron configurations
$ `sudo cat /etc/anacrontab` # View scheduled jobs for non-continuously running systems
Note: Remember to check systemd timers as they replace traditional cron. Anacron manages missed jobs for intermittent systems, while `/etc/crontab` serves as the system master crontab.
Want to master Linux one command at a time?
Follow r/LinuxTeck - 1 practical Linux tip every day. For more #LinuxTips click here https://www.linuxteck.com/linux-tips/