If you’re using the runIn() command, you must add an “unschedule(“abc”)” command BEFORE the runIn(x, “abc”) in order to make it work. Here’s an example:
this will run “myNewEvent” (turning on a switch) 60 seconds after the “motionActiveHandler(evt)” has been called.
You must include the unschedule() command or it won’t work. At least it never worked for me until I added that command.
I lost several hours trying to figure this out too. Neither “runIn” nor “schedule” work well for me in the simulator, I didn’t have a chance to confirm how well these commands work in actual app.
In my experience, the scheduled jobs die eventually after a random number of executions.
Some of the sample apps have this workaround in them too. So this mush be a known bug. I wish it was known to all.