appdaemon icon indicating copy to clipboard operation
appdaemon copied to clipboard

Persistent timers

Open Programie opened this issue 6 months ago • 0 comments

Is there an existing feature request for this?

  • [x] 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.

Programie avatar Jul 18 '25 14:07 Programie