Hi,
I want to set a variable schedule time to execute a flow based on a device command.
With the Timer Trigger Node I can set a time interval, but is there another trigger to change the time interval to one that varies?
Hi,
I want to set a variable schedule time to execute a flow based on a device command.
With the Timer Trigger Node I can set a time interval, but is there another trigger to change the time interval to one that varies?
There isn’t a way to dynamically update the Timer Trigger itself, but there are workarounds that could get you close to what you are after.
First, set up an edge workflow with something like …
Then, in the same workflow (this is necessary if you are going to store the interval in workflow storage) …
true
path contains all the rest of your workflow nodes.For example, say you retrieve the interval and store at a path of working.interval
. In the Conditional Node, you could check if the current Epoch second is evenly divisible by your interval with the following expression, which converts the current time to Epoch seconds using the {{formatDate}}
helper and the remainder operator:
{{formatDate time 'X'}} % {{working.interval}} === 0