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

One Infinite Loop 6pozmo at gmail.com
Fri Jul 8 16:00:28 UTC 2016


No, I understand perfectly why 2 files are needed. All I am saying is that,
in some cases, a section like [Crontab] in a .service file (where you set a
few commands to run every 15 seconds) would be very useful.

On Fri, Jul 8, 2016 at 6:54 PM, Lennart Poettering <lennart at poettering.net>
wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160708/42f9e554/attachment.html>


More information about the systemd-devel mailing list