Scheduled job not executing (light not turning off)


#1

1) Give a description of the problem
This should be a very simple piston. Turns on the porch lights when the door opens. Want them to turn off 15 mins later. But they stay on.

2) What is the expected behavior?
When door opens, turn on lights. Wait 15 mins, turn off.

3) What is happening/not happening?
The lights turn on as expected. Logs show a job scheduled for 15 mins later. The lights stay on.

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
10/15/2017, 7:16:56 AM +657ms
+2ms ╔Received event [Front Door].contact = open with a delay of 1049ms
+151ms ║Runtime (39157 bytes) successfully initialized in 59ms (v0.2.0fa.20171011) (148ms)
+152ms ║╔Execution stage started
+205ms ║╚Execution stage complete. (53ms)
+213ms ╚Event processed successfully (213ms)
10/15/2017, 6:31:03 AM +307ms
+1ms ╔Received event [Front Door].contact = closed with a delay of 273ms
+117ms ║Runtime (39154 bytes) successfully initialized in 38ms (v0.2.0fa.20171011) (115ms)
+118ms ║╔Execution stage started
+167ms ║╚Execution stage complete. (48ms)
+174ms ╚Event processed successfully (174ms)
10/15/2017, 6:31:00 AM +540ms
+1ms ╔Received event [Front Door].contact = open with a delay of 282ms
+131ms ║Runtime (39159 bytes) successfully initialized in 42ms (v0.2.0fa.20171011) (130ms)
+132ms ║╔Execution stage started
+211ms ║║Executed [Porch Lights].on (14ms)
+214ms ║║Executed virtual command [Porch Lights].wait (0ms)
+216ms ║║Requesting a wake up for Sun, Oct 15 2017 @ 6:46:00 AM EDT (in 900.0s)
+220ms ║╚Execution stage complete. (88ms)
+222ms ║Setting up scheduled job for Sun, Oct 15 2017 @ 6:46:00 AM EDT (in 899.995s)
+239ms ╚Event processed successfully (239ms)


#2

In the WITH, click the cog (wheel icon) and change cancellation policy to Never Cancel. The closing event of the door is/was canceling the timer.


#3

Ah, I was wondering if the closed action had an impact. I’ve made the change and will also read up on task cancellation policies. Thanks!


#4

https://wiki.webcore.co/Task_Cancellation_Policy