Little Webcore question

Good afternoon,

A while ago I designed a piston (with help from the legends on here) that once it was triggered, would definitely run all the way through even if it was interrupted or retriggered. It was a for a motion alarm type piston.

I can’t remember or find how to do it again. Its a setting somewhere that ensures the piston runs in its entirety. Can someone remind me where this setting is?


Let’s start with the Task Cancellation Policy (TCP). The usual scenario for that is code like:

   door sensor contact changes to on
   turn something on
   wait 5 minutes
   turn something off
end if

The ‘problem’ can be that by default if the door contact changes back to off while the piston is waiting, the piston triggers and runs again from the top and the pending wake-up from the wait will get cancelled. If the wait needs to complete and the something be turned off, the solution can be to change the TCP to ‘Never cancel tasks’ and that can be done by clicking on the ‘if’, the ‘with’ or the ‘do’ (as in ‘do wait’) which appear in edit mode, and then clicking on the cog.

1 Like

YES!! Got it. Solved. Thanks mate.

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.