[systemd-devel] Timers and Service Conditions

Lennart Poettering lennart at poettering.net
Fri Apr 3 05:21:12 PDT 2015


On Thu, 02.04.15 12:01, Merten Sach (merten at tabinin.eu) wrote:

> Hi,
> 
> I have a problem with a timer that trigges a service that has a condition set.
> The timer defines the following properties:
> 
>   [Timer]
>   OnBootSec=1h
>   OnUnitInactiveSec=1h
>   Unit=autobackup@%i.service
> 
> The service unit set the following condition:
> 
>   ConditionACPower=true
> 
> When I'm now on AC power the service is never active and, therefor, the inactive
> timestamp is never set. This causes the timer to be triggered repeatedly which
> causes a very high system load.

That sounds like a bug. We really should fix that. I figure timer
units with OnUnitInactiveSec should also take the last time they
where triggered into account. 

Will fix, added to the todo list. 

> I want to keep the timer relative to bootup. So, can I avoid OnCalendar= ?

I figure to make this work properly we need to fix systemd first. Sorry!

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list