This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Handling missed scheduler events after reboot
#1
Hi,

If I create Scheduler events to set the value of a Group to a sequence of values with logic like:
- At sunrise, set the "time-of-day" Group = 0
- At sunset, set the "time-of-day" Group = 1
- At 10 PM, set the  "time-of-day" Group = 2

While the system is running without a restart, all is well, and the Group "time-of-day" will be set as each Scheduler event triggers.

However, if I have to do a restart, the Group "time-of-day" will not have been set until the next Scheduler event fires, so is there a way to retrigger missed Scheduler Events in sequence up to the current time, so the value of the Group "time-of-day" would be set to what it would normally be without any restarts?

I expect this would be tricky to do generically, so is there perhaps there are some example Lua scripts that can iterate over the Scheduled Events in sorted time order and figure out which Event would have been the most recent Event to trigger and retrigger just that Event?

Regards

Alex Shepherd
Reply


Forum Jump: