Jobs running in a server


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Jobs running in a server
# 1  
Old 07-02-2013
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
# 2  
Old 07-02-2013
You will find it under /var/spool/cron
This User Gave Thanks to Peasant For This Post:
# 3  
Old 07-02-2013
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 Smilie

Actually Peasant's approach above is cleaner

Last edited by Skrynesaver; 07-02-2013 at 03:51 AM..
# 4  
Old 07-02-2013
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.

Code:
[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
# 5  
Old 07-02-2013
1) You can always do
Code:
cat /etc/passwd

2) Extract user names (1st field) with
Code:
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 Smilie.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

cron jobs not running during certain window

Hi unix.com, I'm currently experiencing a problem on one of our servers at work where between the hours of approx. 1:00 AM and 2:0 AM no jobs scheduled through cron run. Now, in the cron logs I do see that all jobs are launched and I'm not seeing any errors anywhere - but - none of the jobs... (2 Replies)
Discussion started by: tunachamp
2 Replies

2. Shell Programming and Scripting

Running jobs in parallel

I need to process 50 sqlplus scripts which are listed in a text file. I need to develop a shell script that'll read this file and run these sqlplus scripts. At any point of time, the number of sqlplus scripts running shouldn't exceed 6. If any of the sqlplus scripts completes successfully then... (17 Replies)
Discussion started by: gctex
17 Replies

3. UNIX for Dummies Questions & Answers

at jobs not running

im doing at now <return> touch ~/Desktop/file.txt <ctrl d> and file is never created though it says job 7 at Wed Mar 17 15:15:55 2010 why? (4 Replies)
Discussion started by: glev2005
4 Replies

4. Shell Programming and Scripting

Cron Jobs Still Running In Backgound

Hi guys, I've got a few cron jobs ... porblem is they are running as intended but some of them just tend to stay there in sleeping mode for quite some time ... sometimes even days ... for example when i run the ps command i can see that some are still there although the same script had run many... (6 Replies)
Discussion started by: King Nothing
6 Replies

5. OS X (Apple)

cron jobs running, but not...

I have a cron job set up to run a script on my Leopard Server every night. The job is set up as root, and when I run the script manually, it runs fine. The problem is that it is not doing anything when it runs at night. In the cron log, it says it ran, but did not output the results to the file it... (3 Replies)
Discussion started by: yodomino6
3 Replies

6. UNIX for Advanced & Expert Users

Seriously, cron jobs not running.

Before I get a million and one suggestions on all the things that could be wrong with my scripts - let me assure everyone that this is not the issue. i have a RH EL ES4 server that stopped running all cron jobs except hourly, daily, weekly. This has affected all users including root. No... (7 Replies)
Discussion started by: bill_k_Lopez
7 Replies

7. UNIX for Dummies Questions & Answers

How to tell which cron jobs are still running?

I have some cron jobs that are taking a might long time. That is because they are screen scrapers and I inserted an extra long pause (10 minutes between screens) to be extra polite and minimize network traffic. I was going to have them run once a day but now I'm thinking once a week. How do I... (2 Replies)
Discussion started by: siegfried
2 Replies

8. UNIX for Dummies Questions & Answers

running cron jobs

I would like to add a job using cron. I have following questions - cron jobs are launched using what login-id e.g. is the script launced using my login-id - In which directory would the cron jobs be launched ? - where do the environment variables required in the script being lauched come... (3 Replies)
Discussion started by: sharanbr
3 Replies

9. Shell Programming and Scripting

running cron jobs

Hi, I'm new to cron and I would like to know if this cron entry looks right. Every monday to friday, at 9:15 AM execute the script called done_att.sh Every monday to friday, at 3:15 PM execute the script called start_att.sh 15 09 * * /u54/jobs/done_att.sh 45 15 * *... (1 Reply)
Discussion started by: ted
1 Replies

10. UNIX for Dummies Questions & Answers

exit unix, but says running jobs

hi, i give a exit to the system, but it says that i have running jobs... so i do a ps and it displays two lines, one is a -ksh and the other is the ps which i am issuing... then i give a who -uH, find my pts.. then do a grep... still the same..... whats wrong.. (6 Replies)
Discussion started by: yls177
6 Replies
Login or Register to Ask a Question