[systemd-devel] Syntax for periodic calendar events (systemd.time)

Windl, Ulrich u.windl at ukr.de
Wed Sep 4 08:19:03 UTC 2024


Hi!

When trying to adjust a timer that ran with "OnCalendar=daily" to a period like 15 minutes, I made a series of mistakes (after having read systemd.time), so I can make a number of suggestions for improvement:

First I had tried to put the specification inside double-quotes as the string contained a space. The result was a syntax error ("Failed to parse calendar specification"). Couldn't systemd just tolerate the unneeded double-quotes?

I had succeeded for 30 minutes, listing "00,30" in the minutes field, but when I wanted to change it to 5 minutes, I thought the list would become too ugly (i.e.: long), so I tried the "slash syntax".
Unfortunately "*-*-* *:00/5m:00" and "*-*-* *:/5m:00" weren't accepted, just as plain "/5m" was not. Couldn't the first two be accepted, even though the minutes are redundant? And for the last one: Why can't it be accepted; it would look so nice and clean, and (IMHO) it's unambiguous, too.

The eventual syntax I used was "*-*-* *:00/5:00" (for "every 5 minutes"). Isn't it "more ugly then needed"?

Kind regards,
Ulrich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20240904/bad7a0b5/attachment.htm>


More information about the systemd-devel mailing list