On Mon, Sep 12, 2016 at 09:13:26PM +0300, Федор Короткий wrote:
> Hi,
> 
> We are trying to setup a service that runs every day from 10:00 to 18:45.
> 
> Starting is not a problem, we just used timer. But our solution for
> stopping the service seems ugly. We have second service with
> Type=oneshot which runs "systemctl stop first.service" at 18.45(by
> using second timer).
> 
> Is there a better way to achieve this?

  That's basically the way.  Or you can make second service ”empty”
(execing /bin/true) with Conflicts=first.service.

  I would be glad to see .timers extended with TimerAction= option,
being ”start” be default, but allowing stop, isolate, restart etc.
  Maybe open and RFE issue on github?


-- 
Tomasz Torcz                Only gods can safely risk perfection,
xmpp: zdzich...@chrome.pl     it's a dangerous thing for a man.  -- Alia

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to