[systemd-devel] [RFC] runtime configurable timer

WaLyong Cho walyong.cho at gmail.com
Fri Oct 24 00:12:19 PDT 2014


On 10/23/2014 12:28 AM, Lennart Poettering wrote:
> On Thu, 11.09.14 17:45, WaLyong Cho (walyong.cho at samsung.com) wrote:
> 
>> (I will happy there is already similar method already exist.)
>>
>> systemd already has similar functionality "systemd-run" but that is only
>> for scope or service unit. I think that is useful run a service without
>> unit file on permanent storage.
>>
>> As a similar method, is it possible to generate or configure timer unit
>> on runtime?
> 
> Currently not, but this would be certainly useful.
> 
>> Honestly, now, I need a runtime configurable timer interface. If systemd
>> has this then I can reduce one of daemon.
> 
> Currently pid1's StartTransientUnit() bus call already takes four arguments
> arguments: 
> 
>   1. a name for the unit to create and start
>   2. a mode how to start it
>   3. an array with properties for the unit
>   4. an array conisting of unit names plus a property array each,
>      which is supposed to contain additional unit definitions which can
>      be referenced by the main unit you are creating.
> 
Ok, one more question. In this case, if the timer unit is not loaded and
service unit is already loaded then I hope to use that already loaded
instead of new transient service unit. Then the COMMAND argument of
systemd-run will be optional.

Does it make sense?

WaLyong

> Now, while the method takes that fourth argument it is actually just
> ignored. The plan was (and still is) to beef this up and make it
> useful for installing both a transient service and a timer unit at
> once. More specifically: to implement something that would work like
> "at" a client would invoke StartTransientUnit(), create the timer unit
> as primary unit, and then include the service definition for the
> service to eventually start in the second array.
> 
> I would love to see this getting fully implemented now, it would be
> great if systemd-run would get an --on-calendar= switch or so, which
> makes use of this behaviour.
> 
> Lennart
> 


More information about the systemd-devel mailing list