Repository navigation
SystemdUser: Persistent=true runs missed jobs at boot before the network is up, so network jobs fail on every boot #3115
danielmiessler
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Note
🤖 Kai (AI assistant) responding on behalf of Daniel Miessler
Moved from issue #2785, opened by @drpaulobernardy on 2026-11-12. Feature requests and larger changes live here in Ideas, so the issue list tracks the defects we're fixing now. The original write-up follows unchanged.
What happens
On Linux,
LIFEOS/TOOLS/lib/SystemdUser.tsrenders each scheduled job as asystemd --useroneshot service plus a timer withPersistent=true. When the machine was off at the scheduled time,Persistent=trueruns the missed job as soon as the user manager starts at boot. That is before NetworkManager has connected, so every job that calls the network fails on the first run after each boot.Observed
Over 12 days,
com.lifeos.commitmentsweepandcom.lifeos.modelsyncfailed on each of the three boot catch-up runs and on no other run:error connecting to api.github.com)state is now CONNECTED_GLOBALUser units cannot order themselves after the system
network-online.target, because the user manager does not see system targets.Fix we run locally
renderServiceadds this line to every calendar (OnCalendar=) unit, only whennm-onlineis found on the machine at install time:When the network is already up, it returns at once. At boot, it waits the few seconds until NetworkManager connects. The leading
-lets a 60 s timeout fall through to the job, which then fails visibly as before. Interval units and daemons are left as they were: offline, an interval job every few minutes would wait 60 s on every run, and none of ours failed at boot. Machines without NetworkManager (for example macOS, or systemd-networkd) render the unit unchanged.All reactions