Page 1 of 1

Create a sequencer to run the job in infinite loop

Posted: Wed Jul 25, 2007 2:43 am
by bkumar103
Hi,
I am using datastage 7.5 PX. I have one requirement to run the job continuously in infinite loop. The job is scheduled thru sequencer. Is there any way to run the job indefiintely thru sequencer?


Thansk,
Birendra

Posted: Wed Jul 25, 2007 3:32 am
by kumar_s
What is the actualy you are trying to perform?
You can schecule for Every X.
Ot Start loop activity and End loop activty (If available) with a condition which will never fail.
Or a script which will wait till the last file to get produced in Unix and kicks off the job again with some time gap.

Posted: Wed Jul 25, 2007 3:47 am
by ray.wurlod
Continuously-running jobs are, in general, a bad idea except, perhaps, when exposing your job as a web service via RTI stages (SOA edition). Let the jobs finish at least once per day so resources can be cleaned up. Also provide a mechanism so that you can instruct the job to finish on the next cycle.

Please be far more precise about what you are trying to achieve.

Posted: Wed Jul 25, 2007 4:00 am
by bkumar103
Hi,
Yes, process will just stop once per day.

Birendra

Posted: Wed Jul 25, 2007 4:03 am
by kumar_s
So its continously once per day and through out the year?
If so you can schedule it accordingly.

Posted: Wed Jul 25, 2007 4:09 am
by bkumar103
But the one run will over in 10 min or so. Hence it is requred to run in a loop to run it continuously.

Posted: Wed Jul 25, 2007 4:30 am
by kumar_s
What is the funciton of the job?
Was the mentioned approach not helping?

Posted: Wed Jul 25, 2007 4:52 am
by bkumar103
Hi,
Start loop activity and End loop activty (If available) with a condition which will never fail. Is such thing is possible. What could be the condition for such loop.

My job reads from a MQ. I want a continuous run to read from MQ. The job will stop once per day. I am not able to achieve this thru Webspehere MQ stage hence i thought of trying sequencer.


Birendra

Re: Create a sequencer to run the job in infinite loop

Posted: Wed Jul 25, 2007 5:50 am
by reddy.vinod
Hi,
i have faced the same problem and overcomed with one method,i.e.
you first take job what u have run infinite time in job activity, next keep that between start and end loop,next in start loop take '1' in from ,take '1' in step and take some large value like '999999999999999999999999999999999999999' in 'to' .next connect end loop activity to one routine activity with that routine u r running one sample job (this sample job is not in the sequence) after the sample job ,in the sample job u r writing after job routine that routine have call this first sequence again,so it will become a infinie loop,but u should use sleep function at the starting of every routine else u will get error.when it go the sequence u have given a large value in "to" of start loop activity.so it will run a long time after that time it go to the sample job again it wil came back

i have tried it u try and get me back if u have any queries...

Re: Create a sequencer to run the job in infinite loop

Posted: Wed Jul 25, 2007 11:43 pm
by kumar_s
reddy.vinod wrote:Hi,
in the sample job u r writing after job routine that routine have call this first sequence again,so it will become a infinie loop...
But, won't the job will wait till the AfterJob Routine is finished?