Page 1 of 1

want to the job sequence repeatedly until particular time

Posted: Thu Feb 07, 2008 3:41 am
by kvnbabu
I have 4 jobs and one job sequence which runs these 4 jobs. Now, my requirement is to jun the job sequnce repeatedly (looping, like once the job sequence completes running 4 jobs, the sequencer has to be kicked off immediately and run the 4 jobs again) until some time is reach.

Say I start the Job Sequnce at 4:00 AM and want to the sequence until 6:00 AM.

Could anybody guide me please?

Posted: Thu Feb 07, 2008 4:55 am
by asitagrawal
Use the Loop stage. After finishing the last job of the sequence, check if the end time is reached ? Depending on the result, either proceed for next iteration else exit the loop.

HTH :)

Posted: Thu Feb 07, 2008 5:01 am
by asitagrawal
Adding to my last post only..
Start the loop with a default inital value and set the "To" value to a value returned by a routine. The routine will always increment the "To" variables value.

HTH.

Posted: Thu Feb 07, 2008 7:21 am
by Ragunathan Gunasekaran
Scheduling is done only when you determine when the seq has to be kicked off.This kind of looping will would only create a do nothing phenomenon where you loop cycles again and again.Please revamp your design ,i think this would be better

Posted: Thu Feb 07, 2008 7:31 am
by chulett
Do the looping in another Sequence that calls this Sequence inside the Start/End loop stages. A custom routine can exit the loop at the proper time.

Posted: Thu Feb 07, 2008 8:22 am
by sachin1
hello dear,


1.Imagine your 4 jobs take 2 secs to run ok.

2.start your job with some time and imagine you want be in loop for 2 hours.


you have to use UserVariables_Activity,startloop,Job_Activity and EndLoop.

job design like below

UserVariables_Activity--->startloop------->Job_Activity------>EndLoop.

in UserVariables_Activity stage create 3 variables like below

New1---@time+Iconv("00:00:10", "MTS")(ex 10 secs is taken for looping, in your case take 2 hours).

New2---@time, time when job will start, just a starting time.

New3----Iconv("00:00:02", "MTS")(calculate exact time taken by your sequence which in turn runs 4 jobs).

and in start loop stage, loop from
start--New2
step---New3
To--New1

hope it helps.

Posted: Fri Feb 08, 2008 6:48 am
by PhilHibbs
sachin1 wrote:hello dear,
1.Imagine your 4 jobs take 2 secs to run ok.
DS jobs usually take a variable length of time based on how much data they are processing. If he's checking for new files arriving, then it might take 2 seconds to find that there are no files, or half an hour if a big file drops in.