Page 1 of 1

Trigger the list of jobs at the same time

Posted: Tue Apr 05, 2011 10:39 pm
by SURA
Hi All

If i get a list of independent job names; Is there is any way, where i can trigger the list of jobs at the same time.

Example:
Job List
A
B
C

Trigger
A B C

Notes: Not to use Sequence, becaue the job list may vary.

I am in the plan to go for an approach like, create "N" number of batch files for those jobs and trigger the *.bat may trigger at the same time.

But i trust someone might came across this approach / someone might have good approach than this.

Better i can get some good suggestions from 'Gurus'.

Thanks in advance,
DS User

Posted: Tue Apr 05, 2011 11:12 pm
by jwiles
Call the dsjob command (dsjob.exe in windows) to submit your jobs. Syntax is available by entering dsjob without any parameters.

Plenty of examples in the forum here for the searching, such as this one

Regards,

Posted: Tue Apr 05, 2011 11:27 pm
by SURA
Hi James

Thanks for your guidance.

You asked to go for dsjob -run command to trigger from OS level. Am I right?

If so, how to run more than one job?

Please make me clear.

Sorry

DS User

Posted: Tue Apr 05, 2011 11:30 pm
by SURA
Hi James

Sorry. I got it. I check the syntax and came to know how it will work.

I do have one more question. I will post is soon.

Thanks a lot.

DS User

Posted: Tue Apr 05, 2011 11:32 pm
by ray.wurlod
Unless you have a multi-threaded scheduler you're never going to get more than one job to start at precisely the same time. It really doesn't matter anyway, because of variability in job startup times. It's enough to have them start very close together.

The easiest way to do this is to schedule them all to start at the same time. Use any scheduler you like but (as noted) if the scheduler itself is single threaded, then only one job will start, then the next, and so on.

Another approach would be to have each job start whenever but all SLEEP until the agreed time before continuing to process. Using this technique the first row processed by each job will be as close as possible to that in any of the other jobs.

Not really sure why you need this, however.

Posted: Tue Apr 05, 2011 11:45 pm
by SURA
Hi Ray

I totally agree with your point. In the present project,

1. Not decided to use any scheduling tool
2. Not decided to use Sequence
3. Every day will get a list of jobs to run (some day the list may vary)
For example
Job -------- Dependency Job Name
A----------------No Dependency
B-----------------A
C-----------------B,A

With good number of restrictions, i thought of to go for an approach like below.

1. Findout the list of jobs which all are not dependent to any other jobs, trigger the jobs at the same time (Yes slight variation in start time, but dosent matter)
2. Find the list of jobs which all are dependent, can trigger at the same time, but with wait for trigger file option.
3. Which all are the jobs completed will create a trg file at the end of its completion, can be used by wait for file options to trigger.

Is there is any better way to handle this situation.

Thanks
DS User

Posted: Wed Apr 06, 2011 12:27 am
by ray.wurlod
I just scheduled four jobs for the same time from the DataStage Director. To the nearest minute (that is, as far as anyone could tell by looking at Director) they all started at the same time and they all ran concurrently.

But is the right approach what i am trying to do, refering t

Posted: Wed Apr 06, 2011 1:43 am
by SURA
Thanks Ray

But is the right approach what i am trying to do, refering to my previous comment?

Thanks
DS User

Posted: Wed Apr 06, 2011 6:40 am
by chulett
Adding in dynamic dependancies like that is a complete game changer and goes well beyond simply triggering 'a list of jobs at the same time'. It can certainly be done and Ken Bland's KBA Job Control Utility has been doing exactly that for quite a number of years. Rolling your own would be both an interesting and daunting task.