SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
fail-safe at the level of individual jobs

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
fail-safe at the level of individual jobs
Author Message
Ilya Badaev



Joined: 22 Aug 1999
Posts: 4

Post fail-safe at the level of individual jobs Reply with quote

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?

Sun Aug 22, 1999 10:48 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6512

Post Re: fail-safe at the level of individual jobs Reply with quote

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?

Sun Aug 22, 1999 4:07 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.