SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Running batch using local & remote machine

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Running batch using local & remote machine
Author Message
Dannis



Joined: 30 Oct 2001
Posts: 6

Post Running batch using local & remote machine Reply with quote

I have 100 independent batch Access programs which I would like to run in sequence/parallel. I would like to keep both machines busy and running at all time so I can cut down my overall runtime.The desired scenario will be local machine running Job1, while remote machine will get the order to run Job2. Whichever machine available will run job3.How can I use local & remote machines to accomplish that?
So far, I have configured my remote agent and it is working. But it is only doing simple task as running job remotely, that is all. I do not want to specify what machine to run which job, I just want the local/remote machine to run the next job whichever machine is available

Tue Oct 30, 2001 12:04 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: Running batch using local & remote machine Reply with quote

You are talking about some sort of a load balancing. There is no very simple way exist to deal with it.

However, you can do the following thing

Create two job queues, one for local jobs and other for remote jobs

Create two jobs for each task, one is the actual job that executes the Access program, but has for the schedule, and the other job of "script type" which you actually schedule. The script job should run in the "default" job queue. In the script for that job put the following logic:

1. // get list of running jobs in the local queue
Dir [full path to the local queue directory], list1

2. // get list of running jobs in the remote queue
Dir [full path to the remote queue directory], list2

3. Compare the length of the lists to find out which has more jobs
IsLessOrEqual list1, list2, run_locally

4. Depending on the result update the "main" job property to set it where to run
IF run_localy, UPDATE_TO_LOCAL, UPDATE_TO_REMOTE
UPDATE_TO_LOCAL:
JobModify job_name, "QUEUE", ... specify name of the local queue
JobModify job_name, "HOST", ... specify an empty string for local run
GoTo STEP_5

UPDATE_TO_LOCAL:
JobModify job_name, "QUEUE", ... specify name of the remote queue
JobModify job_name, "HOST", ... specify name for the remote agent

5. Run the "main" job
STEP_5:
JobRun job_name

Consider the script above as a template that need tweaking, as you need to add variable declarations and proper job names. Because you have so many jobs I would like to suggest two things:

1. Name "main" jobs exactly as helper script jobs but with a suffix of prefix like "_MAIN". This will allow you to avoid direct references to job names in the scripts. For example, the JobModify statement can be coded using the macro-variables as JobModify "@V"job_name"_MAIN", ... and so on...

2. Create a 24x7 job template (see help for more info on custom templates) which you can then use to quickly generate all script jobs

: I have 100 independent batch Access programs which I would like to run in
: sequence/parallel. I would like to keep both machines busy and running at
: all time so I can cut down my overall runtime.The desired scenario will be
: local machine running Job1, while remote machine will get the order to run
: Job2. Whichever machine available will run job3.How can I use local &
: remote machines to accomplish that?
: So far, I have configured my remote agent and it is working. But it is only
: doing simple task as running job remotely, that is all. I do not want to
: specify what machine to run which job, I just want the local/remote
: machine to run the next job whichever machine is available

Tue Oct 30, 2001 1:15 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.