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

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
ep_datastage
Participant
Posts: 24
Joined: Wed Apr 16, 2014 11:11 am
Location: United States

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

Post 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
PaulVL
Premium Member
Premium Member
Posts: 1315
Joined: Fri Dec 17, 2010 4:36 pm

Post by PaulVL »

execute stage "sleep 900";

15*60 = 900
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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)
-craig

"You can never have too many knives" -- Logan Nine Fingers
cdp
Premium Member
Premium Member
Posts: 113
Joined: Tue Dec 15, 2009 9:28 pm
Location: New Zealand

Post 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.
Post Reply