Jobs running in a server

Hi,

I need to know the jobs running in a server for all users in linux, crontab -l
gives for particular user, how ever I need for all users. I have sudo user access.

Thanks

You will find it under /var/spool/cron

1 Like

ps aux gives you all jobs running on the server
crontab -u ${USER} -l gives you a list of jobs scheduled by the given user, now if only there wwas a convenient list of users on the system you could loop through them listing their scheduled jobs :wink:

Actually Peasant's approach above is cleaner

Hi Peasant,

I have checked that folder it contains only root as a file, does that mean only one user there.

If multiple user exist for cron, that folder /var/spool/cron have multiple entires.

[root@x343k cron]# ls -lrt
total 4
-rw------- 1 root root 1278 Jul  1 05:54 root

Thanks
----------------------------------------------------------------------------------

Hi Skrynesaver,

I don't have total number of user's list, but I need to check all the users jobs.

Any command or system file will help to identify.

Thanks

1) You can always do

cat /etc/passwd

2) Extract user names (1st field) with

awk -F ":" '{ print $1 }' /etc/passwd

3) Now you have your list to loop as Skrynesaver suggested in this thread.
Let us know if you need further help :).