Page 1 of 1

put a 15 minute delay in the next execution of a start loop

Posted: Mon Jun 05, 2017 3:37 pm
by ep_datastage
trying to have a 15 minute delay between each execution of a start and end loop.

How can I accomplish that.


Thanks


Rick

Posted: Mon Jun 05, 2017 4:33 pm
by PaulVL
execute stage "sleep 900";

15*60 = 900

Posted: Mon Jun 05, 2017 6:14 pm
by ray.wurlod
I read between the lines that you require the more elegant solution of sleeping until the next 15 minute point on the clock.

The easiest way (in my opinion) to accomplish this is in a Routine activity, using a routine that calculates the time to which to sleep and issues an appropriate SLEEP command, for example SLEEP 10:45.

Posted: Tue Jun 06, 2017 6:34 am
by chulett
Did exactly that many moons ago when we had a need for a looping sequence to run something every 15 minutes on the mark. So built a routine to check to see how long the previous iteration took (what time did it end) and then do a little time math to know how long to sleep to get to the next quarter hour. 8)

Posted: Tue Jun 13, 2017 4:42 pm
by cdp
I haven't read between the lines, so this might not be what you have asked for, but anyway..
An option could be to have a "Wait for file Activity" Stage just before your 'End Loop' stage:

- Filename: /ds_project/file_does_not_exist.txt
- Wait for file to appear for 15 minutes (will never happen)
- Set Trigger to: "Failed - (Conditional)" for the link that goes to the 'End Loop' stage

--> Will wait 15 minutes before exiting each Loop.