Diffstat (limited to 'blog/entry/systemdtimerpersistent.mdwn')
1 files changed, 36 insertions, 0 deletions
diff --git a/blog/entry/systemdtimerpersistent.mdwn b/blog/entry/systemdtimerpersistent.mdwn
new file mode 100644
@@ -0,0 +1,36 @@
+[[!meta title="Persistent=true when the timer never triggers when the system is powered up"]]
+[[!tag gnu+linux systemd]]
+I have this systemd timer unit
+[[!format ini """
+Description=Run i3-rotate-wallpaper daily
+which says to start the i3-rotate-wallpaper.service unit at each
+`Persistent=true` is meant to ensure that the unit is triggered
+immediately when the system resumes from suspend or is powered on, if
+at the most recent midnight it was suspended or powered off. The idea
+is that when I first use my computer each day, the wallpaper gets
+changed -- I delight in seeing the wallpapers I've downloaded.
+The problem is that `Persistent=true` only works if the timer has been
+triggered at least once when the system is not suspended and powered
+on. But my computer is almost never on at midnight. I don't want to
+have to leave it turned on just for the first wallpaper change, or
+keep track of that when reinstalling the machine's operating system.
+ % mkdir -p "$HOME/.local/share/systemd/timers"
+ % touch "$HOME/.local/share/systemd/timers/stamp-i3-rotate-wallpaper.timer"