Hello, the two unit files shown at the end are supposed to run the service once per week around the specified time. But for some reason the timer triggers at unexpected other times. What needs to be done to make sure it really only runs at the specified OnCalendar= time?
Both units are part of a rpm package. The usual %pre/%post systemd macros are used. It turned out: doing a "rpm -Uvh abc.rpm" does trigger the timer. But surprisingly, not every time that package gets updated. The %post script does "systemctl daemon-reload". The %postun does "systemctl daemon-reload" and "systemctl try-restart abc.timer". In other words: at one weekend, or the days around it, when I update abc.rpm, the timer triggers while rpm (or in fact: zypper) runs. On another weekend, or the days around it, the timer does not trigger while rpm runs. The systemd.timer(5) manual, if I interpret it correctly, gives no hints why the timer would trigger at times other than the one specified in the OnCalendar= setting. Is there a way to enable timer specific debugging, to see why the timer or its service was started? This is going on since a year or two already with SLE15SP5 and SP6 and now SP7. The system in question runs currently systemd-254.24. Thanks, Olaf ==> rpm/abc.timer <== # vim: syntax=systemd [Unit] Description=timer for abc [Timer] OnCalendar=Sat *-*-* 12:34:56 UTC [Install] WantedBy=multi-user.target ==> rpm/abc.service <== # vim: syntax=systemd [Unit] Description=service for abc [Service] Environment=TZ=UTC ExecStart=/usr/share/abc/abc.sh IOSchedulingClass=idle CPUSchedulingPolicy=batch PrivateTmp=true
pgpNYpJAlInVB.pgp
Description: Digitale Signatur von OpenPGP