Trouble with Time Trigger


#1

1) Give a description of the problem
This is a cut simplified version of an issue I’m having. This piston is giving inconsistent behavior. Is this the wrong design? I know this will work if I put the SMS inside the do-every statement. I like having it this way because it makes it easier to test. If this is not a good design, then I’ll probably move the body of the piston to another piston and just call it within the do-every statement. This same behavior happens even if the time interval is longer, like once a day.

2) What is the expected behaviour?
Send an SMS every minute.

3) What is happening/not happening?
It sends an SMS about two or three times in a 24 hour period.

**4) Post a Green Snapshot of the piston![image|45x37]


(UPLOAD YOUR IMAGE HERE)

5) Attach logs after turning logging level to Full
6/4/2019, 7:54:44 PM +266ms
+1ms ╔Received event [Home].time = 1559696084700 with a delay of -434ms
+109ms ║RunTime Analysis CS > 23ms > PS > 36ms > PE > 49ms > CE
+112ms ║Runtime (36620 bytes) successfully initialized in 36ms (v0.3.10c.20190522) (110ms)
+113ms ║╔Execution stage started
+126ms ║╚Execution stage complete. (14ms)
+128ms ║Setting up scheduled job for Tue, Jun 4 2019 @ 7:55:44 PM CDT (in 60.307s)
+136ms ╚Event processed successfully (135ms)Preformatted text


#2

I sometimes test like you do, with the real code outside the time block… but when I am happy with the results, I drag the final code up inside the block.


Alternatively, if you use the code:

IF Time happens every X at Y
END IF

Then all the code beneath will also run when pressing TEST