How to run the same sequencer over and over each day

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Marley777
Premium Member
Premium Member
Posts: 316
Joined: Tue Jan 27, 2004 3:26 pm

How to run the same sequencer over and over each day

Post by Marley777 »

Hi, how can I run the same sequencer over and over daily? For example a sequencer will need to be schedued so that it runs hourly Monday through Friday between 6:AM and 11:PM. The DataStage scheduler in director is limited.


Thanks for your help.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can create a parent sequence that looks after the loop within a day, and schedule this parent sequence once per weekday.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Marley777
Premium Member
Premium Member
Posts: 316
Joined: Tue Jan 27, 2004 3:26 pm

Post by Marley777 »

Hi Ray, thanks for responding, can you please elaborate.
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

You need to create a Job Sequence lets say A with a Start Loop, Job Activity and End Loop. The Counter in the Start Loop should be set how many times you want the job to run. Now, you need to create another Job Sequence(Master/Parent Sequence) with Job Sequence A in it and schedule the Master Sequence once per week day as Ray mentioned.

Hope that helps.
Kris

Where's the "Any" key?-Homer Simpson
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The "DataStage scheduler" is simply an interlude to cron. There's nothing stopping you from doing an "Add to schedule" for every hour in that range except that it would be rather tedious. Don't recall if you can specify "Every weekday" there or not, worst case you would have to repeat that range of hours five times.

Ray is suggesting a master Sequence job that you schedule to start at 6AM each weekday and inside a loop it runs the other sequence (or job) and then waits/sleeps for an hour before continuing the loop. It would loop 18 times and then exit. Only one thing to schedule per day that way.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Marley777
Premium Member
Premium Member
Posts: 316
Joined: Tue Jan 27, 2004 3:26 pm

Post by Marley777 »

Thanks Ray
Thanks Kris
Marley777
Premium Member
Premium Member
Posts: 316
Joined: Tue Jan 27, 2004 3:26 pm

Post by Marley777 »

Thanks everyone
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

On the subject of sleeping, unless your job runs very very quickly it can't afford to sleep for the full 60 minutes, if you do you will slowly start creeping past your straight-up hour start time.

When I had to do this in the past, I recorded the end time of the looped job and then computed how many minutes were left until "the top of the hour". The sleep routine inside the loop then slept that long. For example, the job starts at 8AM and finishes at 8:12, the routine then needs to sleep 48 minutes so that the next run starts on time at 9AM.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply