[systemd-devel] Fwd: Stopping a service at a specific time or after a specific duration

Tomasz Torcz tomek at pipebreaker.pl
Wed Apr 20 13:16:20 UTC 2016


On Wed, Apr 20, 2016 at 01:52:39PM +0100, Jamie Kitson wrote:
> Hi,
> 
> I want to start and stop a systemd.service at specific times. Presumably
> I will use a .timer unit to start the job, but is there a built in way
> to stop the job after a specific duration, or at a specific time, or do
> I have to create a second .timer unit that execs the stop? What is the
> standard/"correct" way to do this?

  For stopping after a duration you can use RuntimeMaxSec=, introduced in v229. 

-- 
Tomasz   .. oo o.   oo o. .o   .o o. o. oo o.   ..
Torcz    .. .o .o   .o .o oo   oo .o .. .. oo   oo
o.o.o.   .o .. o.   o. o. o.   o. o. oo .. ..   o.



More information about the systemd-devel mailing list