Actually, I think ‘test’ is setting itself properly but ‘time’ is not. I believe cEA should be populated on each run based on the event. I created another piston:
As you can see, all this one does is call the first one. You can see the logs below but here is the summary:
After edit:
1st run on timer --> cEA is ‘time’
2nd run when I hit test on piston 2 --> cEA is ‘execute’
3rd run on timer --> cEA is ‘execute’
4th run when I hit test on piston 1 --> cEA is ‘test’
5th run on timer --> cEA is ‘test’
6th run when I hit test on piston 2 --> cEA is ‘execute’
7th run on timer --> cEA is ‘execute’
I believe this may be a bug. I am going to run a couple more tests to check a fixed value for the timer and using ‘every’.
7/2/2020, 5:23:21 PM +209ms
+0ms ╔Received event [Las Vegas].time = 1593735802658 with a delay of -1450ms
+105ms ║RunTime Analysis CS > 25ms > PS > 62ms > PE > 19ms > CE
+108ms ║Runtime (40061 bytes) successfully initialized in 62ms (v0.3.110.20191009) (106ms)
+109ms ║╔Execution stage started
+119ms ║║Comparison (time) 62601322 happens_daily_at (datetime) 1593735921324 = true (0ms)
+120ms ║║Time restriction check passed
+121ms ║║Cancelling condition #2's schedules...
+122ms ║║Condition #2 evaluated true (9ms)
+123ms ║║Cancelling statement #2's schedules...
+128ms ║║Requesting time schedule wake up at Thu, Jul 2 2020 @ 5:25:21 PM PDT
+131ms ║║Cancelling condition #1's schedules...
+131ms ║║Condition group #1 evaluated true (state changed) (18ms)
+134ms ║║Cancelling statement #4's schedules...
+139ms ║║Calculating (string) Current Event Attribute: + (string) execute >> (string) Current Event Attribute: execute
+142ms ║║Current Event Attribute: execute
+143ms ║║Executed virtual command log (1ms)
+145ms ║╚Execution stage complete. (37ms)
+147ms ║Setting up scheduled job for Thu, Jul 2 2020 @ 5:25:21 PM PDT (in 119.979s)
+154ms ╚Event processed successfully (155ms)
7/2/2020, 5:21:22 PM +481ms
+1ms ╔Received event [Las Vegas].execute = :f8a03f565ecfd06745d5f6b024948ebe: with a delay of 91ms
+160ms ║RunTime Analysis CS > 86ms > PS > 57ms > PE > 17ms > CE
+162ms ║Runtime (40073 bytes) successfully initialized in 57ms (v0.3.110.20191009) (160ms)
+163ms ║╔Execution stage started
+172ms ║║Comparison (time) 62482648 happens_daily_at (datetime) 1593735802650 = false (0ms)
+173ms ║║Cancelling condition #2's schedules...
+174ms ║║Condition #2 evaluated false (7ms)
+175ms ║║Cancelling statement #2's schedules...
+180ms ║║Requesting time schedule wake up at Thu, Jul 2 2020 @ 5:23:22 PM PDT
+185ms ║║Comparison (string) execute is (string) test = false (1ms)
+186ms ║║Cancelling condition #3's schedules...
+187ms ║║Condition #3 evaluated false (5ms)
+188ms ║║Cancelling condition #1's schedules...
+189ms ║║Condition group #1 evaluated false (state changed) (22ms)
+191ms ║║Cancelling statement #4's schedules...
+196ms ║║Calculating (string) Current Event Attribute: + (string) execute >> (string) Current Event Attribute: execute
+199ms ║║Current Event Attribute: execute
+200ms ║║Executed virtual command log (1ms)
+202ms ║╚Execution stage complete. (39ms)
+203ms ║Setting up scheduled job for Thu, Jul 2 2020 @ 5:23:22 PM PDT (in 119.974s)
+213ms ╚Event processed successfully (213ms)
7/2/2020, 5:20:54 PM +188ms
+0ms ╔Received event [Las Vegas].time = 1593735655564 with a delay of -1377ms
+95ms ║RunTime Analysis CS > 21ms > PS > 59ms > PE > 16ms > CE
+98ms ║Runtime (40052 bytes) successfully initialized in 59ms (v0.3.110.20191009) (96ms)
+99ms ║╔Execution stage started
+110ms ║║Comparison (time) 62454293 happens_daily_at (datetime) 1593735774295 = true (1ms)
+111ms ║║Time restriction check passed
+113ms ║║Cancelling condition #2's schedules...
+113ms ║║Condition #2 evaluated true (9ms)
+114ms ║║Cancelling statement #2's schedules...
+123ms ║║Requesting time schedule wake up at Thu, Jul 2 2020 @ 5:22:54 PM PDT
+127ms ║║Condition group #1 evaluated true (state did not change) (22ms)
+130ms ║║Cancelling statement #4's schedules...
+138ms ║║Calculating (string) Current Event Attribute: + (string) test >> (string) Current Event Attribute: test
+142ms ║║Current Event Attribute: test
+143ms ║║Executed virtual command log (1ms)
+145ms ║╚Execution stage complete. (46ms)
+146ms ║Setting up scheduled job for Thu, Jul 2 2020 @ 5:22:54 PM PDT (in 119.972s)
+153ms ╚Event processed successfully (153ms)
7/2/2020, 5:18:55 PM +474ms
+0ms ╔Received event [Las Vegas].test = 1593735535474 with a delay of 1ms
+69ms ║RunTime Analysis CS > 20ms > PS > 36ms > PE > 12ms > CE
+72ms ║Runtime (40051 bytes) successfully initialized in 36ms (v0.3.110.20191009) (70ms)
+73ms ║╔Execution stage started
+84ms ║║Comparison (time) 62335552 happens_daily_at (datetime) 1593735655554 = false (0ms)
+85ms ║║Cancelling condition #2's schedules...
+86ms ║║Condition #2 evaluated false (9ms)
+88ms ║║Cancelling statement #2's schedules...
+94ms ║║Requesting time schedule wake up at Thu, Jul 2 2020 @ 5:20:55 PM PDT
+99ms ║║Comparison (string) test is (string) test = true (1ms)
+101ms ║║Cancelling condition #3's schedules...
+102ms ║║Condition #3 evaluated true (6ms)
+103ms ║║Condition group #1 evaluated true (state did not change) (26ms)
+106ms ║║Cancelling statement #4's schedules...
+112ms ║║Calculating (string) Current Event Attribute: + (string) test >> (string) Current Event Attribute: test
+115ms ║║Current Event Attribute: test
+116ms ║║Executed virtual command log (1ms)
+119ms ║╚Execution stage complete. (47ms)
+120ms ║Setting up scheduled job for Thu, Jul 2 2020 @ 5:20:55 PM PDT (in 119.97s)
+131ms ╚Event processed successfully (131ms)
7/2/2020, 5:18:25 PM +121ms
+1ms ╔Received event [Las Vegas].time = 1593735506716 with a delay of -1595ms
+107ms ║RunTime Analysis CS > 21ms > PS > 72ms > PE > 14ms > CE
+110ms ║Runtime (40061 bytes) successfully initialized in 72ms (v0.3.110.20191009) (108ms)
+111ms ║╔Execution stage started
+121ms ║║Comparison (time) 62305237 happens_daily_at (datetime) 1593735625239 = true (1ms)
+122ms ║║Time restriction check passed
+124ms ║║Cancelling condition #2's schedules...
+124ms ║║Condition #2 evaluated true (8ms)
+125ms ║║Cancelling statement #2's schedules...
+131ms ║║Requesting time schedule wake up at Thu, Jul 2 2020 @ 5:20:25 PM PDT
+134ms ║║Cancelling condition #1's schedules...
+135ms ║║Condition group #1 evaluated true (state changed) (19ms)
+137ms ║║Cancelling statement #4's schedules...
+143ms ║║Calculating (string) Current Event Attribute: + (string) execute >> (string) Current Event Attribute: execute
+146ms ║║Current Event Attribute: execute
+147ms ║║Executed virtual command log (2ms)
+149ms ║╚Execution stage complete. (39ms)
+150ms ║Setting up scheduled job for Thu, Jul 2 2020 @ 5:20:25 PM PDT (in 119.978s)
+159ms ╚Event processed successfully (159ms)
7/2/2020, 5:16:26 PM +613ms
+0ms ╔Received event [Las Vegas].execute = :f8a03f565ecfd06745d5f6b024948ebe: with a delay of 72ms
+85ms ║RunTime Analysis CS > 24ms > PS > 49ms > PE > 13ms > CE
+87ms ║Runtime (40073 bytes) successfully initialized in 49ms (v0.3.110.20191009) (86ms)
+88ms ║╔Execution stage started
+98ms ║║Comparison (time) 62186706 happens_daily_at (datetime) 1593735506707 = false (0ms)
+99ms ║║Cancelling condition #2's schedules...
+100ms ║║Condition #2 evaluated false (8ms)
+101ms ║║Cancelling statement #2's schedules...
+106ms ║║Requesting time schedule wake up at Thu, Jul 2 2020 @ 5:18:26 PM PDT
+111ms ║║Comparison (string) execute is (string) test = false (1ms)
+113ms ║║Condition #3 evaluated false (4ms)
+114ms ║║Cancelling condition #1's schedules...
+114ms ║║Condition group #1 evaluated false (state changed) (22ms)
+117ms ║║Cancelling statement #4's schedules...
+122ms ║║Calculating (string) Current Event Attribute: + (string) execute >> (string) Current Event Attribute: execute
+125ms ║║Current Event Attribute: execute
+126ms ║║Executed virtual command log (1ms)
+128ms ║╚Execution stage complete. (40ms)
+129ms ║Setting up scheduled job for Thu, Jul 2 2020 @ 5:18:26 PM PDT (in 119.974s)
+139ms ╚Event processed successfully (139ms)
7/2/2020, 5:16:09 PM +156ms
+1ms ╔Received event [Las Vegas].time = 1593735370667 with a delay of -1511ms
+69ms ║RunTime Analysis CS > 17ms > PS > 42ms > PE > 10ms > CE
+72ms ║Runtime (40054 bytes) successfully initialized in 42ms (v0.3.110.20191009) (70ms)
+72ms ║╔Execution stage started
+82ms ║║Comparison (time) 62169233 happens_daily_at (datetime) 1593735489235 = true (0ms)
+83ms ║║Time restriction check passed
+85ms ║║Cancelling condition #2's schedules...
+85ms ║║Condition #2 evaluated true (8ms)
+86ms ║║Cancelling statement #2's schedules...
+92ms ║║Requesting time schedule wake up at Thu, Jul 2 2020 @ 5:18:09 PM PDT
+94ms ║║Cancelling condition #1's schedules...
+95ms ║║Condition group #1 evaluated true (state changed) (17ms)
+97ms ║║Cancelling statement #4's schedules...
+102ms ║║Calculating (string) Current Event Attribute: + (string) time >> (string) Current Event Attribute: time
+106ms ║║Current Event Attribute: time
+106ms ║║Executed virtual command log (1ms)
+108ms ║╚Execution stage complete. (36ms)
+110ms ║Setting up scheduled job for Thu, Jul 2 2020 @ 5:18:09 PM PDT (in 119.98s)
+119ms ╚Event processed successfully (119ms)