-
Notifications
You must be signed in to change notification settings - Fork 427
Description
Is there an existing feature request for this?
- I have searched the existing issues
Your feature request
Right now, a timer configured using the run_*()
methods (like run_daily()
) of the ADAPI could miss an execution if AD is not running at the time of the execution.
This is usually not an issue for timers which are executed every few seconds, minutes or hours, but could be an issue for daily executed timers.
In some cases, it might be useful to have a persistent timer which ensures to execute timers on start whenever they where missed due to a restart for AppDaemon or the whole system.
An example of an implementation of persistent timers is systemd on Linux systems: In case the system is not online when the timer should be executed, the timer is executed on the next boot if persistence of the timer is enabled. Something similar could be implemented in AppDaemon.
Of course, this would need some way to store the last execution to check whether the timer should be executed on start or at the usual time. Maybe a namespace could be used for that.