Hi,
I am not sure if this is a bug or just me not understanding the behaviour
correctly (the latter is more likely). Perhaps related to
https://github.com/systemd/systemd/issues/6036
I have a system that doesn't have access to time or an RTC for about 10
minutes after boot. When the system powers on, it starts at a system time
of 2000-01-01 00:00:00 and then after ~10 minutes it will have the correct
time. I have recently changed my cron jobs over to systemd timers, but it
behaves differently in a time skip situation.
When systemd sees this time skip (forward 25+ years...) presumably it is
trying to catch up, because it is running the job every 5 seconds pretty
much constantly and it doesn't care about my OnCalendar= directive. Is
there some directive or similar I can use to have the timer ignore time
skips and only run if the OnCalendar directive matches the current time?
send_status.timer:
```
[Unit]
Description=Send status data timer
[Timer]
OnCalendar=*:00/10:00
[Install]
WantedBy=timers.target
```
send_status.service:
```
[Unit]
Description=Send status data
[Service]
ExecStart=/home/pi/venv/bin/python /home/pi/send_status_data.py
```
systemctl show send_status.timer:
```
Unit=send_status.service
TimersCalendar={ OnCalendar=*-*-* *:00/10:00 ; next_elapse=Sat 2025-10-11
10:20:00 AEST }
OnClockChange=no
OnTimezoneChange=no
NextElapseUSecRealtime=Sat 2025-10-11 10:20:00 AEST
NextElapseUSecMonotonic=0
LastTriggerUSec=Sat 2025-10-11 10:14:08 AEST
LastTriggerUSecMonotonic=57min 43.885033s
Result=success
AccuracyUSec=1min
RandomizedDelayUSec=0
FixedRandomDelay=no
Persistent=no
WakeSystem=no
RemainAfterElapse=yes
Id=send_status.timer
Names=send_status.timer
Requires=sysinit.target
WantedBy=timers.target
Conflicts=shutdown.target
Before=send_status.service shutdown.target timers.target
After=time-sync.target time-set.target sysinit.target
Triggers=send_status.service
Description=Send status data timer
LoadState=loaded
ActiveState=active
FreezerState=running
SubState=waiting
FragmentPath=/etc/systemd/system/send_status.timer
UnitFileState=enabled
UnitFilePreset=enabled
StateChangeTimestamp=Sat 2025-10-11 10:14:09 AEST
StateChangeTimestampMonotonic=3464382531
InactiveExitTimestamp=Fri 2025-10-10 13:02:29 AEST
InactiveExitTimestampMonotonic=2866849
ActiveEnterTimestamp=Fri 2025-10-10 13:02:29 AEST
ActiveEnterTimestampMonotonic=2866849
ActiveExitTimestampMonotonic=0
InactiveEnterTimestampMonotonic=0
CanStart=yes
CanStop=yes
CanReload=no
CanIsolate=no
CanFreeze=no
StopWhenUnneeded=no
RefuseManualStart=no
RefuseManualStop=no
AllowIsolate=no
DefaultDependencies=yes
OnSuccessJobMode=fail
OnFailureJobMode=replace
IgnoreOnIsolate=no
NeedDaemonReload=no
JobTimeoutUSec=infinity
JobRunningTimeoutUSec=infinity
JobTimeoutAction=none
ConditionResult=yes
AssertResult=yes
ConditionTimestamp=Fri 2025-10-10 13:02:29 AEST
ConditionTimestampMonotonic=2866831
AssertTimestamp=Fri 2025-10-10 13:02:29 AEST
AssertTimestampMonotonic=2866832
Transient=no
Perpetual=no
StartLimitIntervalUSec=10s
StartLimitBurst=5
StartLimitAction=none
FailureAction=none
SuccessAction=none
InvocationID=d5df240384d74bc883df0cebef385b27
CollectMode=inactive
```
HW/OS: raspberry pi 5 running raspbian
systemd --version
```
systemd 252 (252.36-1~deb12u1)
+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS
+OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD
+LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2
+LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT
default-hierarchy=unified
```
uname -a
```
Linux remote-pi 6.12.25+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.25-1+rpt1
(2025-04-30) aarch64 GNU/Linux
```
Thanks,
Jeremy