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?
|