SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Running simultaneous remote jobs

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Running simultaneous remote jobs
Author Message
Charles Oliva



Joined: 14 Mar 2004
Posts: 1

Post Running simultaneous remote jobs Reply with quote

I'm trying to put together a generic routine that starts/stops services running on several remote servers simultaneously and am not having much luck. We have one master scheduler and a number of remote agents.

I have three scripts- a master job that then runs two jobs on each remote agent.

***Master routine (not scheduled, marked synchronous):
dim sServiceName string, "xxx"
dim sFunction string, "stop" //stop or start
dim sAgentName string

Set (sAgentName, "Agent1")
JobRemoteRun ("Start/Stop Service Init", sAgentName)
SetRemoteVariable (sAgentName,"global.sServiceName", sServiceName)
SetRemoteVariable (sAgentName,"global.sFunction", sFunction)
JobRemoteRun ("Start/Stop Service", sAgentName)

Set (sAgentName, "Agent2")
JobRemoteRun ("Start/Stop Service Init", sAgentName)
SetRemoteVariable (sAgentName,"global.sServiceName", sServiceName)
SetRemoteVariable (sAgentName,"global.sFunction", sFunction)
JobRemoteRun ("Start/Stop Service", sAgentName)

***Start/Stop Service Init (not scheduled, marked synchronous):
dim global.sServiceName string
dim global.sFunction string

***Start/Stop Service (not scheduled, marked asynchronous):
Too long to list here, but uses the global.
sServiceName and global.sFunction values to
determine which service to start or stop.

Since the "Start/Stop Service" routine can take a while, I would like that remote job to run asynchronously. However, running the code listed above results in the remote jobs being synchronized. Any suggestions on how to switch this to asynch so that I can speed up this routine?

Sun Mar 14, 2004 5:17 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: Running simultaneous remote jobs Reply with quote

You will either need to create and schedule a separate job for every agent in put it into a different job queue or create a generic job with [no schedule] reading input data from some file (such as egent name, service name command type) and run it asynhronious from the main job as below

Dim pid, number
Run "24x7 /JOB [job id here]", "", pid

: I'm trying to put together a generic routine that starts/stops services
: running on several remote servers simultaneously and am not having much
: luck. We have one master scheduler and a number of remote agents.

: I have three scripts- a master job that then runs two jobs on each remote
: agent.

: ***Master routine (not scheduled, marked synchronous): dim sServiceName
: string, "xxx"
: dim sFunction string, "stop" //stop or start
: dim sAgentName string

: Set (sAgentName, "Agent1")
: JobRemoteRun ("Start/Stop Service Init", sAgentName)
: SetRemoteVariable (sAgentName,"global.sServiceName", sServiceName)
: SetRemoteVariable (sAgentName,"global.sFunction", sFunction)
: JobRemoteRun ("Start/Stop Service", sAgentName)

: Set (sAgentName, "Agent2")
: JobRemoteRun ("Start/Stop Service Init", sAgentName)
: SetRemoteVariable (sAgentName,"global.sServiceName", sServiceName)
: SetRemoteVariable (sAgentName,"global.sFunction", sFunction)
: JobRemoteRun ("Start/Stop Service", sAgentName)

: ***Start/Stop Service Init (not scheduled, marked synchronous): dim
: global.sServiceName string
: dim global.sFunction string

: ***Start/Stop Service (not scheduled, marked asynchronous): Too long to list
: here, but uses the global.
: sServiceName and global.sFunction values to
: determine which service to start or stop.

: Since the "Start/Stop Service" routine can take a while, I would
: like that remote job to run asynchronously. However, running the code
: listed above results in the remote jobs being synchronized. Any
: suggestions on how to switch this to asynch so that I can speed up this
: routine?

Sun Mar 14, 2004 8:44 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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 vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.