Systemctl --user enable unit.timer does not start after reboot

I am trying to set up a systemd.timer for my user, which only runs while my user is logged in. The unit itself and the related service file work fine when starting manually when testing.

However, even though I enabled the timer unit, it does not start after a reboot, but states “inactive (dead)” as if not enabled. Looking at the “Loaded” line though, I can clearly see that it is recognized as enabled.
I used the following line to enable it:

systemctl --user enable unit.timer

The unit file itself looks like this:

[Unit]
Description=description for unit file
After=multi-user.target

[Timer]
OnCalendar=12:00:00
AccuracySec=1us

[Install]
WantedBy=multi-user.target

I also tried to add my user’s slice as After=user-<uid>.slice to delay it further, but it does not change anything.

What am I missing? Why is it not started even though it is enabled?

For the timer the install should be timers.target.

ref: Systemd Timers for Scheduling Tasks - Fedora Magazine

Service/Timer I use for weather:

[Unit]
Description="Pull weather using wttr.in for sway bar" 

[Service]
Type=simple
ExecStart=%h/bin/weathercache.bash

[Install]
WantedBy=sway-session.target
[Unit]
Description=Pull from wttr.in every 30 minutes

[Timer]
Persistent=true
OnBootSec=30
OnCalendar=*:0/30
Unit=weathercache.service

[Install]
WantedBy=timers.target
5 Likes