[systemd-devel] Adding a Timer section to .service files

Lennart Poettering lennart at poettering.net
Fri Jul 8 15:54:46 UTC 2016


On Fri, 08.07.16 16:03, One Infinite Loop (6pozmo at gmail.com) wrote:

> If you want to disable timer alone or do something else, then you could use
> .timer file. If not, instead of [Install] section in  .service file, you​
> could have a [Timer] section.

The reason timer definitions and service definitions are separate is
that timers may be in effect independently of the services they
trigger, and services may be active independently of any timers they
are triggered by. Thus, as the lifecycle of both is pretty much
independent of each other, and independent object should have their
own 1:1 unit files on disk we chose to have the timer and service unit
files separate on disk too.

Why I do acknowledge your PoV on this, and can see why it appears
suprising at first why you have to have two files on disk for this
instead of just one, I think ultimately it's more uniform and easier
to grok if independent objects with independent lifecycles map to
independent files on disk.

Hope that makes sense.

(Also, your email/quoting program appears very broken)

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list