Don't run piston if it's been run within last X minute


#1

1) Give a description of the problem
First time poster here, apologize if I’m doing anything wrong. I’ve written quite a few pistons and have a general understanding of it, but can’t seem to be able to figure out a way to do this. I have a piston that gets run exclusively via external URL (HTTP request from Tasker), that contains no conditions, just actions. I’d like to add a condition so that those actions don’t get run IF the piston was executed within the last 5 minutes, regardless of how often Tasker calls the URL - i.e. If (piston didn’t run within last 5 minutes) then {do action}. Is that doable?

2) What is the expected behaviour?
(PUT YOUR INFO HERE)

3) What is happening/not happening?
(PUT YOUR INFO HERE)

4) Post a Green Snapshot of the pistonimage
(UPLOAD YOUR IMAGE HERE)

5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

First thing that comes to mind is have one of the actions set a variable, say alreadyRan to true and then use that as one of the conditions. Another task is a 5 minute timer with Task Cancellation Policy set to Never so it will not get shut down when the piston gets executed again. When the 5 minute timer expires, another task sets your alreadyRan variable to false.


#3

Thanks so much! Task Cancellation Policy is new to me too so definitely learning something new!