<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
I would have my timer be duration-based instead of calandar based
(assuming that fits your need)<br>
<br>
You could use one of the following<br>
<br>
OnActiveSec=48h (two days after the timer last triggered<br>
OnUnitActiveSec=48h (two days afte the unit was last started)<br>
<br>
Or slightly different<br>
<br>
OnUnitInactiveSec=24h (one day after the service FINISHED)<br>
<br>
In all those cases, since this is interval based, you would need a
way to "prime the pump" I usually do this with<br>
<br>
OnStartupSec=15m (1/4h after the machine was started) <br>
<br>
or simply by enabling the service itself so it's part of the boot
sequence (this will work with OnUnitActive and OnUnitInactive, but
not with OnActive)<br>
<br>
<div class="moz-cite-prefix">On 05/11/2018 09:36, Andy Pieters
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAB2L6a_d6nWdrzQ5X63xh0e91qrd3qc3VwoxUzqXg4eqZugZOA@mail.gmail.com">
<pre wrap="">Dear Systemd list
I have got a job that I want to execute every other day.
The job is rather lengthy and takes more than 24 hours to complete but
less than 48.
So here are my criteria:
Start today
Start the day after tomorrow (t+2d)*1
Start the (t+2d)*2
Start 2 days after that (t+2d)*n
My timer unit:
[Timer]
OnCalendar=*-*-01,03,05,07,09,11,13,15,17,19,21,23,25,27,29,31 03:30:00
The problem with that is when I simulate the execution dates,
specifically at newyear:
Tue 2018-12-25 03:30:00 CET
Thu 2018-12-27 03:30:00 CET
Sat 2018-12-29 03:30:00 CET
Mon 2018-12-31 03:30:00 CET
Tue 2019-01-01 03:30:00 CET
Thu 2019-01-03 03:30:00 CET
Sat 2019-01-05 03:30:00 CET
Mon 2019-01-07 03:30:00 CET
Wed 2019-01-09 03:30:00 CET
We can see that the timer would be triggered two days in a row.
What can we do about this, please? Is there a better way to define a
timer to run every other day? Can we perhaps add an exception for a
specific date?
Thank you kindly
Keep up the good work!
Andy
_______________________________________________
systemd-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel">https://lists.freedesktop.org/mailman/listinfo/systemd-devel</a>
</pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<div>
<link href="https://fonts.googleapis.com/css?family=Raleway"
rel="stylesheet" type="text/css">
<font face="Raleway, regular">
<table style="padding:20px;margin-bottom:-10px" border="0">
<tbody>
<tr>
<td style="font-size:13px; color:#ff8054; text-align:
center; padding-right:30px"> <a
href="http://www.smile.eu/"> <img
style="max-width:100%; height:auto"
src="http://ftp.smile.fr/client/Communication/signature/img/Logo-new.png"
alt="SMILE"> </a><br>
<br>
<p style="line-heigth:8px">20 rue des Jardins<br>
92600 Asnières-sur-Seine</p>
</td>
<td style="border-left: 1px solid #3b7ffe;
padding-left:20px; font-size:13px; color:#ff8054;">
<div style="color:#ff8054; font-size:14px;"> <b>Jérémy
ROSEN</b> </div>
<div style="color:#3b7ffe; font-size:13px;">
Architecte technique<br>
Responsable de l'expertise Smile-ECS </div>
<br>
<div style="color:#3b7ffe; font-size:13px;"> <span
style="white-space: nowrap"><img
style="margin-right:5px"
src="http://ftp.smile.fr/client/Communication/signature/img/mail.png"
alt="email" width="12" height="10"> <a
href="mailto:jeremy.rosen@smile.fr"
style="color:#3b7ffe; font-size:13px;
text-decoration:none;">jeremy.rosen@smile.fr</a>
</span> <br>
<span style="white-space: nowrap"><img
style="margin-right:5px"
src="http://ftp.smile.fr/client/Communication/signature/img/phone.png"
alt="phone" width="10" height="10"></span>
+33141402967 <br>
<span style="white-space: nowrap"><img
style="margin-right:5px"
src="http://ftp.smile.fr/client/Communication/signature/img/web.png"
alt="url" width="12" height="12">
<a href="http://www.smile.eu"
style="color:#3b7ffe; font-size:13px;
text-decoration:none;">http://www.smile.eu</a> </span>
</div>
<br>
<div> <span><a style="margin-right:5px"
href="https://twitter.com/GroupeSmile"><img
src="http://ftp.smile.fr/client/Communication/signature/img/rs-twitter.png"
alt="Twitter" style="max-width:100%;
height:auto"></a></span> <span><a
style="margin-right:5px"
href="https://www.facebook.com/smileopensource"><img
src="http://ftp.smile.fr/client/Communication/signature/img/rs-facebook.png"
alt="Facebook" style="max-width:100%;
height:auto"></a></span> <span><a
style="margin-right:5px"
href="https://www.linkedin.com/company/smile"><img
src="http://ftp.smile.fr/client/Communication/signature/img/rs-linkedin.png"
alt="LinkedIn" style="max-width:100%;
height:auto"></a></span> <span><a
style="margin-right:5px"
href="https://github.com/Smile-SA"><img
src="http://ftp.smile.fr/client/Communication/signature/img/rs-github.png"
alt="Github" style="max-width:100%;
height:auto"></a></span> </div>
</td>
</tr>
</tbody>
</table>
<br>
<div> <a
href="http://smile.eu/?utm_source=signature&utm_medium=email&utm_campaign=signature"><img
src="http://signature.smile.eu/assets/img/bandeau_mail_smile2017.gif.gif"
alt="Découvrez l’univers Smile, rendez-vous sur
smile.eu" border="0"></a></div>
<br>
<div style="color:#a3acb5; font-size:10px;"> <img
src="http://ftp.smile.fr/client/Communication/signature/img/eco.png"
alt="eco" width="13" height="11"> Pour la planète,
n'imprimez ce mail que si c'est nécessaire </div>
</font>
</div>
</div>
</body>
</html>