<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hello!</p>
<p>Have a .timer service like:</p>
<p>======</p>
<p>[Unit]<br>
Description=Runs VBA32 Update Hourly<br>
Requires=timers.target<br>
<br>
[Timer]<br>
OnBootSec=2min<br>
OnUnitInactiveSec=1h<br>
<br>
[Install]<br>
WantedBy=timers.target</p>
<p>======</p>
<p>to run vba32update.service in 1 hour after previous
update-session is over (OnUnitInactiveSec=1h).</p>
From man-page: "<code class="varname">OnUnitInactiveSec=</code>
defines a timer relative to when the unit the timer is activating
was last deactivated."<br>
<br>
Ok, here is log-snippet:<br>
======<br>
Июл 08 22:05:00 linux-mk500 systemd[1]: Starting VBA32 Anti-Virus
Update Service...<br>
Июл 08 22:05:00 linux-mk500 vbacl[14768]: Vba32 console scanner
update process started<br>
Июл 08 22:05:00 linux-mk500 vbacl[14768]: Reading configuration
options from ./vbacl.ini<br>
Июл 08 22:05:00 linux-mk500 vbacl[14768]: Using direct connection
for update<br>
Июл 08 22:05:02 linux-mk500 vbacl[14768]: Current dir is ./<br>
Июл 08 22:05:02 linux-mk500 vbacl[14768]: Start update from
<a class="moz-txt-link-freetext" href="http://anti-virus.by/update">http://anti-virus.by/update</a><br>
Июл 08 22:05:02 linux-mk500 vbacl[14768]: Receiving file list<br>
Июл 08 22:05:02 linux-mk500 vbacl[14768]: File list received<br>
Июл 08 22:05:02 linux-mk500 vbacl[14768]: Update is not needed<br>
Июл 08 22:05:02 linux-mk500 systemd[1]: Started VBA32 Anti-Virus
Update Service.<br>
<br>
Июл 08 23:05:13 linux-mk500 systemd[1]: Starting VBA32 Anti-Virus
Update Service...<br>
Июл 08 23:05:13 linux-mk500 vbacl[15289]: Vba32 console scanner
update process started<br>
Июл 08 23:05:13 linux-mk500 vbacl[15289]: Reading configuration
options from ./vbacl.ini<br>
Июл 08 23:05:13 linux-mk500 vbacl[15289]: Using direct connection
for update<br>
Июл 08 23:05:17 linux-mk500 vbacl[15289]: Current dir is ./<br>
Июл 08 23:05:17 linux-mk500 vbacl[15289]: Start update from
<a class="moz-txt-link-freetext" href="http://anti-virus.by/update">http://anti-virus.by/update</a><br>
Июл 08 23:05:17 linux-mk500 vbacl[15289]: Receiving file list<br>
Июл 08 23:05:17 linux-mk500 vbacl[15289]: File list received<br>
Июл 08 23:05:17 linux-mk500 vbacl[15289]: Update is not needed<br>
Июл 08 23:05:17 linux-mk500 systemd[1]: Started VBA32 Anti-Virus
Update Service.<br>
<br>
Июл 09 00:05:20 linux-mk500 systemd[1]: Starting VBA32 Anti-Virus
Update Service...<br>
Июл 09 00:05:20 linux-mk500 vbacl[16050]: Vba32 console scanner
update process started<br>
Июл 09 00:05:20 linux-mk500 vbacl[16050]: Reading configuration
options from ./vbacl.ini<br>
Июл 09 00:05:20 linux-mk500 vbacl[16050]: Using direct connection
for update<br>
Июл 09 00:05:24 linux-mk500 vbacl[16050]: Current dir is ./<br>
Июл 09 00:05:24 linux-mk500 vbacl[16050]: Start update from
<a class="moz-txt-link-freetext" href="http://anti-virus.by/update">http://anti-virus.by/update</a><br>
Июл 09 00:05:24 linux-mk500 vbacl[16050]: Receiving file list<br>
Июл 09 00:05:24 linux-mk500 vbacl[16050]: File list received<br>
Июл 09 00:05:24 linux-mk500 vbacl[16050]: Update is not needed<br>
Июл 09 00:05:24 linux-mk500 systemd[1]: Started VBA32 Anti-Virus
Update Service.<br>
<br>
Июл 09 01:05:50 linux-mk500 systemd[1]: Starting VBA32 Anti-Virus
Update Service...<br>
Июл 09 01:05:50 linux-mk500 vbacl[16528]: Vba32 console scanner
update process started<br>
Июл 09 01:05:50 linux-mk500 vbacl[16528]: Reading configuration
options from ./vbacl.ini<br>
Июл 09 01:05:50 linux-mk500 vbacl[16528]: Using direct connection
for update<br>
Июл 09 01:05:55 linux-mk500 vbacl[16528]: Current dir is ./<br>
Июл 09 01:05:55 linux-mk500 vbacl[16528]: Start update from
<a class="moz-txt-link-freetext" href="http://anti-virus.by/update">http://anti-virus.by/update</a><br>
Июл 09 01:05:55 linux-mk500 vbacl[16528]: Receiving file list<br>
Июл 09 01:05:55 linux-mk500 vbacl[16528]: File list received<br>
Июл 09 01:05:55 linux-mk500 vbacl[16528]: Update is not needed<br>
Июл 09 01:05:55 linux-mk500 systemd[1]: Started VBA32 Anti-Virus
Update Service.<br>
======<br>
<br>
We see 22:05:02 (end of update-session) --> 23:05:13 (start of
next update-session) --> 23:05:17 (end of update-session) -->
00:05:20 (start of next update-session) --> 00:05:24 (end of
update-session) --> 01:05:50 (start of next update-session)
--> 01:05:55 (end of update-session).<br>
<br>
Question: Why time of new update-session is *not* equal to time of
end of previous update-session + 1h in section of seconds, e.g.
23:05:17 +1h = 00:05:17; 00:05:24 + 1h = 01:05:24 and so on? Is here
a way to reach this precise coincidence?<br>
<br>
Thanks!<br>
<br>
Platform: x64, openSUSE Leap 42.1, systemd 210.<br>
</body>
</html>