Hi,
I'm doing data gathering every minute so I'm doing loop in my flow but I don't know how. So if anyone have done loop time interval please do share with me.
Thanks.
Solved! Go to Solution.
What I hear as your problem is:
if the flow takes 20 seconds, I only need a 40 second wait time….if the flow takes 10 seconds, I need a 50 second wait time, etc.
in order to achieve this, I would:
Loop
Get urgent date time to %StartTime%
Add 1 minute to %StartTime% to get %NextTime%
‘Perform 1 Loop’s actions here
Loop While 1= 1
Get current datetime to %CheckTime%
If %CheckTime% is > %NextTime%
Exit (Loop)
End(If)
End (Loop)
End(Loop)
this will loop through checking what time it is and move onto the next loop when the CurrentDateTime is exactly 1 mins past the previous start time.
Glad you got it figured out. I thought there was an Add DateTime function that is just a number parameter and then a drop down for interval (days, months, hours, minutes, etc).
always good new to hear it works. Best of luck in your future flows.
Every minute, forever?
You could have a scheduled flow run every minute, instead, by using the schedule trigger.
Otherwise, in a loop, you would put in a delay at the top of it.
I answer questions on the forum for 2-3 hours every Thursday!
Hi @Zdahn,
In a nutshell you will have to use a combination of "Wait" and any of the "Loop" actions.
If that does not suffice, please share more details of what you are looking for and what do you intend to do.
Hi @Rhiassuring, PS: this is Desktop Flows forum 😉
Yeah, as @VJR wrote - you would need to give some context. Otherwise, we can only advice using the "wait" action.
What are you waiting for in that loop?
Is this some information that popups in the web or GUI app? If yes -try to use dedicated actions such as: wait for a text, wait for window, wait for element, wait for image to appear/disappear etc.
In general i avoid using pure "wait" as this affects performance vs if i can wait for specific element/text/image
The WEB that I'm working is https://www.tradingview.com/chart/?symbol=BITSTAMP%3AXRPUSD showing a minute interval countdown for every closing price. I'm supposed to use wait for an element, unfortunately no popups in web that 1 minute time already lapsed or closing interval. In addition, that countdown display stays as it is and it can't pick an element,
I think it's a canvass.
So my plan actually is to use another clock apps in windows but you will have to automate to reset in a loop which will turn out to exceed 1 minute and may not sync with the WEB's interval countdown.
Any assistance would be very much appreciated.
Thanks
Zdahn.
Use their API 😎 instead of automating interface
What I hear as your problem is:
if the flow takes 20 seconds, I only need a 40 second wait time….if the flow takes 10 seconds, I need a 50 second wait time, etc.
in order to achieve this, I would:
Loop
Get urgent date time to %StartTime%
Add 1 minute to %StartTime% to get %NextTime%
‘Perform 1 Loop’s actions here
Loop While 1= 1
Get current datetime to %CheckTime%
If %CheckTime% is > %NextTime%
Exit (Loop)
End(If)
End (Loop)
End(Loop)
this will loop through checking what time it is and move onto the next loop when the CurrentDateTime is exactly 1 mins past the previous start time.
That I don't know how. I'll look in to it. Thanks for advise
Just an idea, I've noticed the two values on the screenshot are spyable, so maybe use those?
Or, as mentioned earlier, avoid using fixed wait: Grab the new price, do logic, and wait until the price disappears in a loop
How do you add a minute to %StartTime% ?
How do you add a minute to %StartTime% ?
Hey MichaelAnnis,
You're awesome, It did work !!! We finally created auto-repeat interval. Check if I did it right and if any improvement that I need to do in this flow please let me know..
Again thanks.
Zdahn
I still have to add another condition within the loop. This is to resolve issue if %StartTime .minute% = 0.
Glad you got it figured out. I thought there was an Add DateTime function that is just a number parameter and then a drop down for interval (days, months, hours, minutes, etc).
always good new to hear it works. Best of luck in your future flows.
Sharing with you final revision.
Loop still did not exit if Start time minute gets to zero(0) eventually makes %NewTime% as 1. So here's the final version I did and tested already.
Thanks.