It is currently 12 Dec 2018 6:04


Post new topic  Reply to topic  [ 7 posts ] 
Author Message
PostPosted: 09 May 2011 8:25 
Offline
Nouveau
Nouveau
User avatar

Joined: 10 Dec 2007 12:00
Posts: 69
Location: Boston
We have 8 servers that cannot be down at the same time. I'm trying to setup a job to reboot each server after it has been patched. I have the first job executing a shutdown reboot command. The second job I'd like to have is a job that pings the server. Upon a successful ping and job end, I'd like to repeat the process till all 8 servers have been sucessfully rebooted.

The problem that I'm running into is that the first job ends before the reboot is successful and the second job kicks off and it sucessfully pings because at that exact time the server is still up, but on it's way down. We are running windows, not unix.

Anyone have a script that would do this ?


Top
   
 Post subject:
PostPosted: 10 May 2011 4:31 
Offline
Nouveau
Nouveau
User avatar

Joined: 10 May 2011 12:00
Posts: 1
In my work environment, there is a workaround created for this.
First the reboot job runs.
Then a second wait job runs that has a sleep command. So it runs for 5 minutes doing nothing
Then the check job runs which is set up as cyclic to ping the server. Once the job completes successfully the cyclic is stopped and the next job starts.

Hope that helps,


Top
   
 Post subject:
PostPosted: 10 May 2011 4:36 
Offline
Nouveau
Nouveau
User avatar

Joined: 10 Dec 2007 12:00
Posts: 69
Location: Boston
What are you using for the ping job? A script?, a single command?


Top
   
 Post subject:
PostPosted: 24 May 2011 4:17 
Offline
Nouveau
Nouveau
User avatar

Joined: 10 Dec 2007 12:00
Posts: 69
Location: Boston
Answer anyone?


Top
   
 Post subject:
PostPosted: 25 May 2011 3:50 
Offline
Nouveau
Nouveau
User avatar

Joined: 10 Dec 2007 12:00
Posts: 69
Location: Boston
Nikhil,

The reason we can't use the sleep command is that we want to use remote hosts on the servers and not have to load an agent.

Anyone have any other suggestions?


Top
   
 Post subject:
PostPosted: 25 May 2011 5:46 
Offline
Nouveau
Nouveau
User avatar

Joined: 13 Jun 2007 12:00
Posts: 317
Job1 to shutdown Server1: NodeID = Server1; command = WaitShut.cmd
Job2 to shutdown Server1: NodeID = Server2; command = WaitShut.cmd Server1
Job3 to shutdown Server1: NodeID = Server3; command = WaitShut.cmd Server2
so on and so forth

Job1 link to Job2 link to Job3 ...

WaitShut.cmd
==========
if "%1" EQU "" goto SHUT

REM sleep interval in seconds
set SLEEP=60

:WAIT
timeout /t %SLEEP% > NUL
ping -n 1 %1 | find /i "destination host unreachable"
if errorlevel 1 goto WAIT

:SHUT
REM relevant shutdown parameters
set PARAMETERS=/r /f /t 5 /d p:0:0
shutdown %PARAMETERS%


Top
   
 Post subject:
PostPosted: 26 Oct 2012 5:11 
Offline
Nouveau
Nouveau
User avatar

Joined: 08 Jun 2007 12:00
Posts: 807
Location: Varese - Italy
you can do a second job (ping server) on another agent (server agent for example) and use:
- a command Job "ping ServerName"
- in panel set of the same command job use the "%%PRECMD=sleep 300"


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 7 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited
The site created by Franck YOT. Images, logo, content and trademarks about Control-M products are property of BMC Software.
All the comments are property of their posters. Images, logo, content and design are © copyright by Scheduler-Usage.com. All Rights Reserved