Currently the sleep action does not restart if it is currently waiting and called again.
I would request a checkbox, where i can choose, if the timer should restart if activated.
Sleep - option to reset if called again
Moderator: Martin
Re: Sleep - option to reset if called again
Hi,
Action Sleep: 5s should wait for 5 seconds before the next action is executed. When you execute a flow twice, each sleep action should wait for the 5 seconds without affecting the other sleep action that's currently running.
Could you describe in more detail what kind of flow you would like to build, perhaps there's another way to achieve the desired behaviour.
Regards,
Martin
Action Sleep: 5s should wait for 5 seconds before the next action is executed. When you execute a flow twice, each sleep action should wait for the 5 seconds without affecting the other sleep action that's currently running.
Could you describe in more detail what kind of flow you would like to build, perhaps there's another way to achieve the desired behaviour.
Regards,
Martin
Re: Sleep - option to reset if called again
I think I understood this.
Execute flow with sleep action(30s) -> execute it again before the first sleep action has ended -> the flow continues forward two times, one time after each sleep action without stopping the first run.
Sometimes thats causing undesirable behavior especially when using variables, as it messes then up depending on how the flow is built. It can be "fixed" by putting a stop flow action at the start, but I think it would be better to have that option straight in the sleep action.
Execute flow with sleep action(30s) -> execute it again before the first sleep action has ended -> the flow continues forward two times, one time after each sleep action without stopping the first run.
Sometimes thats causing undesirable behavior especially when using variables, as it messes then up depending on how the flow is built. It can be "fixed" by putting a stop flow action at the start, but I think it would be better to have that option straight in the sleep action.
Re: Sleep - option to reset if called again
I think this does not belong to the sleep action since this could be a problem with every action when you don't want to execute the same flow multiple times in parallel.
I have some raw ideas on my todo-list to avoid such issues but it's not ready to be implemented yet (something like general options for a flow to skip, delay, cancel, limit and coalesce executions).
I have some raw ideas on my todo-list to avoid such issues but it's not ready to be implemented yet (something like general options for a flow to skip, delay, cancel, limit and coalesce executions).
Re: Sleep - option to reset if called again
Maybe check box options to triggers to disable the flow while it's running and to stop the flow if it triggers while it's running?
Re: Sleep - option to reset if called again
Yes, something like that but in the flow instead of the trigger(s) since it's usually the design of the flow that makes parallel execution undesirable. Moreover one trigger could be used in different flows where one flow should only be executed once at a time and another flow should be executed for every event, even when this means that the flow is executed in parallel.
I had something like this in mind (very rough idea):
-a new menu item in the flow editing activity called "Options..."
-this opens a new screen with a dropdown containing items "Skip", "Delay", "Stop", "Limit", "Coalesce", ...
-Skip: don't execute the flow when it's already running (-->completely ignores the trigger event)
-Delay: wait until the executing flow terminates (probably with a timeout)
-Stop: stop the executing flow and execute the flow from start again
-Limit: only execute the flow when the flow did not exceed some kind of limit like 3 times in 5 minutes otherwise skip
-Coalesce: wait to execute the flow until no new trigger event arrives within a given duration
...but I have to think this over since it could also lead to a lot of problems like flows stalling each other and stuff like that.
I had something like this in mind (very rough idea):
-a new menu item in the flow editing activity called "Options..."
-this opens a new screen with a dropdown containing items "Skip", "Delay", "Stop", "Limit", "Coalesce", ...
-Skip: don't execute the flow when it's already running (-->completely ignores the trigger event)
-Delay: wait until the executing flow terminates (probably with a timeout)
-Stop: stop the executing flow and execute the flow from start again
-Limit: only execute the flow when the flow did not exceed some kind of limit like 3 times in 5 minutes otherwise skip
-Coalesce: wait to execute the flow until no new trigger event arrives within a given duration
...but I have to think this over since it could also lead to a lot of problems like flows stalling each other and stuff like that.
Re: Sleep - option to reset if called again
Sounds good. If it could be done per flow basis, it wouldn't affect other flows.