CRON on Unix Server


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users CRON on Unix Server
# 1  
Old 07-20-2012
CRON on Unix Server

What is the command to list out all the CRON's running on a UNIX Server
# 2  
Old 07-20-2012
have you ever heard of "crontab" ???

Check here!!!
# 3  
Old 07-20-2012
crontab -l [user] will list the commands for the given user (the user option is only applicable if you are root). I don't think there's a command to list for all users in one go, if that's what you are asking. For that you would need to "cat" all the users crontab files, which you could only do if you were root.

But I'm guessing that you're not root, since you wouldn't need to ask this question Smilie
# 4  
Old 07-20-2012
Don't worry about root login.. I will get that....Can you give the command for the listing all the CRONS..........
# 5  
Old 07-20-2012
There isn't one. There is a section in the manual page that PikK45 linked to called FILES. You should read that. You should respect other peoples privacy before you go rummaging around in their stuff.
# 6  
Old 07-20-2012
So the answer is simple " There isn't one". You could have replied at first go.
Also don't jump to conclusion about anyone's privacy....its an official matter and will be taken care through due permission of respective authority.
# 7  
Old 07-20-2012
With a simple shell loop processing /etc/passwd user you can accomplish the same.

(this is HPUX)

Try this oneliner as root.
Code:
awk -F":" ' { print "crontab -l " $1 } ' /etc/passwd | sh

Or something like ..
Code:
for i in $(awk -F":" ' { print $1 } ' /etc/passwd)
do
printf "crontab for user $i \n"
crontab -l $i
printf  "end crontab for user $i\n"
done

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find and delete files and folders which are n days older from one unix server to another unix server

Hi All, Let me know how can i find and delete files from one unix server to another unix server which are 'N' days older. Please note that I need to delete files on remote unix server.So, probably i will need to use sftp, but question is how can i identify files and folders which are 'N'... (2 Replies)
Discussion started by: sachinkl
2 Replies

2. UNIX for Dummies Questions & Answers

Keep Server Alive with Cron Job

Despite my best efforts, my media streaming server still dies sometimes and I am in a random place trying to ssh into the server to restart it on my cell phone after customers start calling.... I tried using google to track down a script that would do the following Every 5 min execute: sudo... (1 Reply)
Discussion started by: ajhalls
1 Replies

3. Shell Programming and Scripting

Connecting to multiple unix server from unix server using shell script

Hi Gurus, I'm a unix newbie and I would like to connect to multiple unix servers from unix server using shell script i.e from server a to server b,c,d etc. I want to copy the files from unix server a to server b, c, d. I can access staright using ssh without the need to have password and user... (5 Replies)
Discussion started by: sexyTrojan
5 Replies

4. UNIX for Dummies Questions & Answers

To copy a file from one unix server to another unix server through scripts

I am getting the fallowing error when i am trying to execute the scp commomd in shell script warning: You have no controlling tty. Cannot read confirmation. warning: Authentication failed. Disconnected; key exchange or algorithm negotiation failed (Key exchange failed.). scp2: warning: ssh2... (1 Reply)
Discussion started by: manit
1 Replies

5. UNIX for Advanced & Expert Users

Cron jobs in a unix server

Dear all, Is it possible to view all the cronjobs set under all the userids in a server. Or view all the cronjobs in the server? Thanks in anticipation, Sree. (2 Replies)
Discussion started by: Sreejith_VK
2 Replies

6. Shell Programming and Scripting

How to connect unix server to unix server through shell scripts

Hi, I would like to connect UNIX server to UNIX server through shell scripts and i have some concepts . But i am totally confused how to connect UNIX server to UNIX server throuth running a script. It will be greatful to me if any buddy will help me. with simple example please. Thanks in... (2 Replies)
Discussion started by: phatan
2 Replies

7. Shell Programming and Scripting

How to connect unix server to unix server through shell scripts

Hi, I would like to connect UNIX server to UNIX server through shell scripts and i have some concepts . But i am totally confused how to connect UNIX server to UNIX server throuth running a script. It will be greatful to me if any buddy will help me. Thanks in advance. Phatan:) (2 Replies)
Discussion started by: phatan
2 Replies

8. UNIX for Dummies Questions & Answers

Server moved, new IP, broken CRON job

Due to downsizing and attrition, I have inherited SysAdmin tasks, but unfortunately not all the required knowledge and skills came to me along with the assignment -> so I appreciate any advice and help ( be patient with my newbie terms and questions). We moved a central server and changed it's... (1 Reply)
Discussion started by: HikerLT
1 Replies

9. UNIX for Dummies Questions & Answers

CRON Job - saving to a different server?

Thanks for the all the help last evening on CRON jobs. It's now working. Is it possible with cron to save a backup of a file to a different server or location? The idea being that if one host goes arse over tit, I'll have a backup of the DB on another server? Many thanks, Ed Ludlow (3 Replies)
Discussion started by: eludlow
3 Replies
Login or Register to Ask a Question