[systemd-devel] timed events
Lennart Poettering
lennart at poettering.net
Mon Jul 9 14:24:32 PDT 2012
On Fri, 29.06.12 10:49, Nathan (qwerty.nat at gmail.com) wrote:
> Hello,
>
> I have built systemd version 26 for red hat enterprise 6.2. It works well.
>
> I am trying to replace a half broken init system/service management
> system we have running which was built in-house (and all the developers
> have left)
>
> I am even managing some daemons of my own with it successfully.
>
> Looking at the systemd.timer documentation it seems as though all
> the timers are relative. Is there any way to get absolute timers
> relative to real time (cron like functionality - even in a later
> version?).
As Auke mentioned: yes currently they are all relative only, and that
still includes the newest version.
We definitely want to add calendar time support as well, but are a bit
afraid of picking the right language for expressing time
events. i.e. whether we should just try to reuse the cron syntax, come
up with something new, or try to focus on the iCal or ISO syntaxes.
The actual implementation shouldn't be too hard and with today's kernel
capabilities would allow for a lot of addtional interesting features
(like really easy support for having timer events that wake up the
machine from suspend and things likt that)
> Another issue (though slightly related) is we have an external binary
> that when run will return 0 or 1 depending if we should run a service
> is there a way to run this command in the service_name.service and
> start the service if it returns 0 and stop the service if the
> script
> returns 1 (retrying the script every 5 minutes or so).
No this isn't really supported nicely.
> Finally are there acls (or similar) so that user X can manage the
> state of his services and only his services?
You can use D-Bus policy for this, but it has quite an awful syntax.
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list