How to find all users with cron jobs in Linux

I ran into an issue where I had to clear several cron jobs that were firing off backups. They were no longer needed and were causing some issues. I found that the command listed below would show all cron jobs on the system. You may need to switch users accounts from root depending on which user account created the job.

sudo su -

for user in `cat /etc/passwd | grep bash | awk -F: {'print $1'}`; do crontab -u $user -l; done

The output will list all entries in crontab, you can then change to the account that owns the job and use crontab -e to make changes as needed.

Subscribe to RSS - Linux