From systemd-devel Sun Mar 29 19:28:34 2015 From: "T.C. Hollingsworth" Date: Sun, 29 Mar 2015 19:28:34 +0000 To: systemd-devel Subject: Re: [systemd-devel] OnCalendar every X minutes Message-Id: X-MARC-Message: https://marc.info/?l=systemd-devel&m=142765731813396 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============0510121313==" --===============0510121313== Content-Type: multipart/alternative; boundary=001a11336aba1c87c80512725fa1 --001a11336aba1c87c80512725fa1 Content-Type: text/plain; charset=UTF-8 On Mar 29, 2015 9:52 AM, "Max" wrote: > > Hi. > > Is there a way to make timer unit which will execute things every X minutes where X > is not divisor for 60? > In case of divisor it's obvious: > > [Timer] > OnCalendar=*:00/10 > > Will run every 10 minutes which nicely fit into 60 minutes hour. What if I would like > to run things every 11 minutes: 0, 11, 22, 33, 44, 55, 66, 77... > > If I interpret http://www.freedesktop.org/software/systemd/man/systemd.time.html > correctly than > OnCalendar=*:00/11 will run on 0, 11...44,55,0,11... resulting in unevenness at the > end of an hour. > > Am I missing something? Yes. :-) See OnActiveSec and related options, listed right above OnCalendar in the documentation you linked to. -T.C. --001a11336aba1c87c80512725fa1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On Mar 29, 2015 9:52 AM, "Max" <maxim.suraev@campus.tu-berlin.de&g= t; wrote:
>
> Hi.
>
> Is there a way to make timer unit which will execute things every X mi= nutes where X
> is not divisor for 60?
> In case of divisor it's obvious:
>
> [Timer]
> OnCalendar=3D*:00/10
>
> Will run every 10 minutes which nicely fit into 60 minutes hour. What = if I would like
> to run things every 11 minutes: 0, 11, 22, 33, 44, 55, 66, 77...
>
> If I interpret http://www.freedesktop.org/software/systemd/man/syst= emd.time.html
> correctly than
> OnCalendar=3D*:00/11 will run on 0, 11...44,55,0,11... resulting in un= evenness at the
> end of an hour.
>
> Am I missing something?

Yes. :-)=C2=A0 See OnActiveSec and related options, listed r= ight above OnCalendar in the documentation you linked to.

-T.C.

--001a11336aba1c87c80512725fa1-- --===============0510121313== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18Kc3lzdGVtZC1k ZXZlbCBtYWlsaW5nIGxpc3QKc3lzdGVtZC1kZXZlbEBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0 cDovL2xpc3RzLmZyZWVkZXNrdG9wLm9yZy9tYWlsbWFuL2xpc3RpbmZvL3N5c3RlbWQtZGV2ZWwK --===============0510121313==--