Wait for Duration during a schedule

tphillips
Tera Contributor

Obviously I am not understanding the "Wait for a duration" flow logic in Flow Designer. 

Here is what I am trying to do:

  • During M-F, 8-5 allow the flow to run without delay.
  • All other times, wait for 10 mins.

I have tried setting up a schedule to no success.  It either waits 10 mins or waits until the scheduled and then 10 mins.

 

find_real_file.png

 

 

Any good examples out there?

Thank you!

Tom

1 ACCEPTED SOLUTION

Andrew Albury-D
Mega Guru

Hi Tom,

The "Wait for duration" during a schedule will stop a timer progressing until the amount of time has progressed, during the schedule. e.g. if you asked it to wait 10 minutes on a saturday, it would wait until Monday morning, then 10 minutes.

I've accomplished what you are trying to do by creating a "Is Time In Schedule?" action, which takes the input of a date/time (normally Flow Start Time, or gs.Now()) and returning a true/false. If TRUE, run the next step, ELSE, pause for 10 minutes, then run the next step.

I'm sorry I don't have the code handy for that action, but a community search should help you find out how to do it.

 

Regards,

Andrew

View solution in original post

2 REPLIES 2

Andrew Albury-D
Mega Guru

Hi Tom,

The "Wait for duration" during a schedule will stop a timer progressing until the amount of time has progressed, during the schedule. e.g. if you asked it to wait 10 minutes on a saturday, it would wait until Monday morning, then 10 minutes.

I've accomplished what you are trying to do by creating a "Is Time In Schedule?" action, which takes the input of a date/time (normally Flow Start Time, or gs.Now()) and returning a true/false. If TRUE, run the next step, ELSE, pause for 10 minutes, then run the next step.

I'm sorry I don't have the code handy for that action, but a community search should help you find out how to do it.

 

Regards,

Andrew

Thank you, Andrew.  I found your other post and implemented it in my flow.

 

Tom