Four Stars

Pause, wait or Sleep considerations (parallel branches)

Hello all !

 

Please consider this situation : I have a job and at a specific moment I have 2 branches running in parallel.

What I would like to obtain is to have one branch starting 10 seconds after the other. I thought about using tSleep component but it appears that this component pauses the whole job an not the branch where it is located.

Ugly workaround : using a tLoop in order to waste some time doing nothing.

 

But I'm sure there is a clean way to answer this question. What's your opinion ? (Please avoid a solution based on subjobs, I would like to avoid reconstructing the whole job)

 

Thanks for your help !

  • Data Integration
Tags (4)
1 ACCEPTED SOLUTION

Accepted Solutions
Nine Stars

Re: Pause, wait or Sleep considerations (parallel branches)

You can choose any (mean - file or database),

 

for example I use similar for prevent accidental execution

Case 1 - Job store to database timestamp, and first component in Job read this timestamp, and if it same month - stop execution, send alarm for investigation and manual reset if need redo

 

Case 2 - Job analyse day of month and if it not 1st - stop 

Case 3 - Job check result of other Job, and if it not satisfy rules - stop again (alarm and etc)

 

in my case it tMySQLInput  or tMySQLInput + tJavaFlex and then 2 flow by triggers Run-If, one for success and one for error

-----------
3 REPLIES
Nine Stars

Re: Pause, wait or Sleep considerations (parallel branches)

as variant:

store start time in database (csv file as variant)

first step - read time, and check time difference

if difference less than 10 sec - sleep for difference

store it own start time

continue all other steps

-----------
Four Stars

Re: Pause, wait or Sleep considerations (parallel branches)

Thanks for your answer.
Just to be sure I properly understand, how would you implement this solution ? (Using which components ?)

Again, thank you for your contribution !
Nine Stars

Re: Pause, wait or Sleep considerations (parallel branches)

You can choose any (mean - file or database),

 

for example I use similar for prevent accidental execution

Case 1 - Job store to database timestamp, and first component in Job read this timestamp, and if it same month - stop execution, send alarm for investigation and manual reset if need redo

 

Case 2 - Job analyse day of month and if it not 1st - stop 

Case 3 - Job check result of other Job, and if it not satisfy rules - stop again (alarm and etc)

 

in my case it tMySQLInput  or tMySQLInput + tJavaFlex and then 2 flow by triggers Run-If, one for success and one for error

-----------