Page 1 of 1

How do I cancel a pending "_delayed_action" scheduled action

PostPosted: Tue Oct 27, 2015 3:21 pm
by alang_94526
I generally try to avoid using the "Delay by #" feature in Actions especially if the delays are long because I've never been able to figure out how to cancel them cleanly once they are initiated if the need arises.
I have a simple test case where I trigger on an event and toggle a variable after 2 minutes using the "Delay By" option.
In the Schedule window, I see a "_delayed_action_57" scheduled event for 2 minutes from when it was initiated which will toggle the variable.
However, if I want to cancel this other than by selecting that scheduled event and deleting it, how would I do it?

How do I cancel a pending "_delayed_action" scheduled action

PostPosted: Tue Oct 27, 2015 3:36 pm
by durosity
This may help:

http://wiki.indigodomo.com/doku.php?id= ... ed_actions

For anything I do that could need that I have mini Python scripts setup to remove the relevant ones from the list. I find this the easiest way to use them but YMMV.


Sent from my iPad using Tapatalk

Re: How do I cancel a pending "_delayed_action" scheduled ac

PostPosted: Tue Oct 27, 2015 3:47 pm
by alang_94526
That link is exactly what I was looking for. I didn't realize it existed. Canceling a delay initiated by a trigger is perfect for what I'm trying to do
Thanks a lot.

Re: How do I cancel a pending "_delayed_action" scheduled ac

PostPosted: Thu Jan 14, 2016 2:15 pm
by alang_94526
I have another Schedule question.
How do I set up a time offset to the schedule repeat option?

To set up a repeating schedule event, I use the "Every" option e.g. schedule this event every 15 minutes.
However, this will schedule this repeating action at 12:00, 12:15, 12:30, 12:45, 13:00.....
I am looking for a way to add an offset of say, 3 to the repeat rate so I could make it 12:03, 12:18, 12:33, 12:48, 13:03.....

Any ideas how to implement that?

Re: How do I cancel a pending "_delayed_action" scheduled ac

PostPosted: Thu Jan 14, 2016 3:36 pm
by jay (support)
Set the start time of the schedule to 12:03 rather than 12:00. If you always want randomization, then add the randomization in the Time section.

Re: How do I cancel a pending "_delayed_action" scheduled ac

PostPosted: Thu Jan 14, 2016 4:21 pm
by alang_94526
That's really what my question is - how do you set the start time?

Re: How do I cancel a pending "_delayed_action" scheduled ac

PostPosted: Thu Jan 14, 2016 4:37 pm
by jay (support)
Oh, right, you're doing every. Unfortunately, every is always scheduled to start at midnight and calculates from there. As I said, you can add a little randomization so that each time through it will be slightly different. Another thing you can do is delay your actions by 3 minutes - effectively making them execute with the 3 minute offset you want.

Re: How do I cancel a pending "_delayed_action" scheduled ac

PostPosted: Thu Jan 14, 2016 4:44 pm
by alang_94526
That could work though for complicated action, since the delay is a hard-wired number rather than a variable, it is a little inflexible.
Though I was hoping for something simpler I can make it work.
Thanks for the quick replies.