runIn functionality


(Ash (www.smart-dots.com) / Ashutosh Jaiswal) #1

Quick question,

In the following code, once a mode change event is triggered, runIn would kick in. But if the mode change event is triggered again, would the original runIn get reset and start again? I think it does, but just wanted to make sure thats the case

Assume XXXX is a number

def modeChangeHandler(evt) {
if (location.mode == “AwayMode”)
{
runIn(XXXX,“gotoyyy”)
}
}


(Sebastian) #2

Yes, it will be overwritten/reset as long as you don’t specify [overwrite: false].

http://docs.smartthings.com/en/latest/smartapp-developers-guide/scheduling.html?highlight=runin