-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Feature: Systemd timers
Create, inspect and modify systemd timers using Cockpit.
Currently timer properties like TimersMonotonic, TimersCalendar cannot be set via dbus.
Current method for setting timer involves creating a .timer
file with all the required properties mentioned in it.
Instead it would be better to have some properties like TimersCalendar
and TimersMonotonic
take values via D-Bus after connecting to that timer's DBus interface.
An example case for TimersCalendar Property :
The function SetCalendar()
takes 1st parameter as "OnCalendar"
and 2nd parameter like "daily"
, "weekly"
and like wise to set Timer's calendar property.
An example case for TimersMonotonic Property :
The function SetBootUsec()
takes an integer input (in usec) like for example 900000000
for 15mins.
The function SetUnitActiveUSec()
takes an integer input (in usec) like for example 900000000
for 15mins.
Having some timer properties (esp calendar, OnBootUsec and OnUnitActiveUsec) to be set via dbus through a method would help both developers and users.
Use Case: The current approach is to create .timer files with hard coded parameter values. It would be nice to have few methods in D-Bus that sets possibly calendar, monotonic timer (OnBootUsec, OnUnitActiveUSec) values.
Some other example use cases are :
- Alfred works as a system administrator. He makes a backup of the file servers data every night. He now wants backup only on a weekly basis. He could change/set timer from
daily
toweekly
by usingSetCalendar()
. - Jon wants to run application which is not really crucial for his work so he doesn't want it to slow down boot process. He wants to run existing unit one hour after system start.
SetBootUsec()
could help him set that time.
Note: This additional functionality was not found in the TODO list. https://github.com/systemd/systemd/blob/master/TODO
Mock up for timer development in Cockpit :