I have this systemd timer unit

[Unit]
Description=Run i3-rotate-wallpaper daily

[Timer]
OnCalendar=daily
Persistent=true

[Install]
WantedBy=timers.target

which says to start the i3-rotate-wallpaper.service unit at each midnight.

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.

The fix:

% mkdir -p "$HOME/.local/share/systemd/timers"
% touch "$HOME/.local/share/systemd/timers/stamp-i3-rotate-wallpaper.timer"