A workable, but not ideal solution has been found, thanks to eibyer but would appreciate any other ideas still. Thank you.
1) Give a description of the problem
In the piston, a variable controls the time for an action to occur. This variable can be updated when conditions change. If this happens, the scheduled time dose not update, it keeps the previously scheduled time then will correct next cycle. The line that schedules the time is line 92 via the variable “Check_Time”. Lines 43-91 are what dictate the wait time by setting the variable “Check_Time”
2) What is the expected behavior?
When variable the sets the scheduled time changes, webcore cancels previous schedule and schedules new time. So as example, if Check_Time was 90 the piston will schedule a check in 90 mintues, but during that time, conditions may have changed and Check_Time may change to 10 but the scheduled check will still fire after 90 minutes instead of 10.
3) What is happening/not happening?
continues previously scheduled event
4) Post a Green Snapshot of the piston
5) Attach any logs (From ST IDE and by turning logging level to Full)
|+0ms|╔Received event [Home].test = 1546467318411 with a delay of 0ms|
|—|---|
|+266ms|║RunTime Analysis CS > 14ms > PS > 190ms > PE > 63ms > CE|
|+270ms|║Runtime (57057 bytes) successfully initialized in 190ms (v0.3.109.20181207) (269ms)|
|+272ms|║╔Execution stage started|
|+288ms|║║Condition #2 evaluated false (8ms)|
|+289ms|║║Condition group #1 evaluated false (state did not change) (10ms)|
|+304ms|║║Comparison (dynamic) dry changes_to (string) Wet = false (1ms)|
|+306ms|║║Condition #9 evaluated false (11ms)|
|+316ms|║║Comparison (dynamic) dry is (string) Wet = false (2ms)|
|+318ms|║║Condition #25 evaluated false (11ms)|
|+320ms|║║Condition group #100 evaluated false (state did not change) (25ms)|
|+321ms|║║Condition group #8 evaluated false (state did not change) (28ms)|
|+325ms|║║Cancelling statement #26’s schedules…|
|+335ms|║║Executed virtual command setVariable (4ms)|
|+342ms|║║Executed virtual command setVariable (3ms)|
|+349ms|║║Executed virtual command setVariable (3ms)|
|+379ms|║║Comparison (enum) dry stays (string) wet = false (2ms)|
|+382ms|║║Cancelling any timed trigger schedules for condition 22|
|+383ms|║║Cancelling statement #22’s schedules…|
|+385ms|║║Condition #22 evaluated false (16ms)|
|+386ms|║║Condition group #21 evaluated false (state did not change) (18ms)|
|+405ms|║╚Execution stage complete. (134ms)|
|+409ms|║Setting up scheduled job for Wed, Jan 2 2019 @ 6:39:32 PM EST (in 5054.011s)|
|+420ms|╚Event processed successfully (421ms)|