Locating crontab scheduled tasks in *nix

If you need a list of all users crontab tasks, run this as root:

 

will loop over each user name listing out their crontab. The crontabs are owned by the respective users so you won’t be able to see another user’s crontab w/o being them or root.

–[edit] if you want to know, which user does a crontab belong to insert echo $user

As a side note, this doesn’t work when the users are defined in NIS or LDAP. You need to use

I have also seen this bash script that supposedly takes into account displaying other crons, (including the scripts launched by run-parts in /etc/cron.hourly, /etc/cron.daily, etc.) and the jobs in the /etc/cron.d.

I have not thoroughly tested this script, I ran it once on my server, I found it here.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *