Perhaps job "JobA" should run at "AgentA", and if "AgentA" is not available, it slides to run at "AgentB". Here is what you can do: 1. Setup "JobA" so it has no trigger (cannot start by itself) and it creates a semaphore file "FileA" (via notify action) when it fails. 2. Create JOB.INI file that will hold most recent job configuration (agent, etc...). In this file, create "JobA" section and "Agent" key. Initialize this key to be "AgentA". See example: [JobA] Agent=AgentA 3. Create a text file AGENTS.LST listing all desired Remote Agents. For example: AgentA AgentB AgentC 4. Create another job "JobDispatcher" (24x7 script type) that triggers "JobA" when it is necessary for you. Code something like the following: // ... declare script variables here ... TRY_AGAIN: NotFileExists("FileA", no_file) IfThen(no_file, RUN_JOB) FileDelete("FileA") INIFileGet("job.ini", "JobA", "agent", agent) // ... some logic to find mathing agent name in the AGENTS.LST // ... place "next logical" agent name into agent variable // Modify job definition to use another agent JobModify("JobA", "AGENT", agent) // Remember new agent name INIFileSet("job.ini", "JobA", "agent", agent) // Run the job RUN_JOB: JobRun("JobA") NotFileExists("FileA", no_file) IfThen(no_file, TRY_AGAIN) : Because of the fact that the number of scheduled tasks I deal with is huge I : have a number of servers to run jobs at. It happens that a server is down : for some reason, but the job still needs to run. In ideal I would like to : be able to give a list of remote agents a job may be run at and if the job : fails at a remote agent the scheduler would try to run it on the next : remote agent in pool. Is this possible?
|