Esse recurso já foi implementado em systemd (ver > = 212) usando o Diretiva Persistent=
, para que você só precise inserir Persistent=true
no arquivo de unidade ao usar a diretiva OnCalendar=
para estabelecer a data / hora para executar o trabalho.
Persistent=
Takes a boolean argument. If true, the time when the service unit was last triggered is stored on disk. When the timer is activated, the service unit is triggered immediately if it would have been triggered at least once during the time when the timer was inactive. This is useful to catch up on missed runs of the service when the machine was off. Note that this setting only has an effect on timers configured with OnCalendar=.