My .timer file located in ~/.config/systemd/user
doesn't show in output of systemctl --user list-timers --all
command unless i enable it. Is it normal for this command to not show disabled .timers alongside enabled ones?
I cannot enable the .timer without an [Install]
section because of The unit files have no installation config
error. According to freedesktop.org documentation:
Timer units will automatically have a dependency of type Before= on timers.target
Does this mean that i do not have to enable my .timer for it in order to work?
If i do need to enable my .timer:
I believe that default.target
is what software which is to be executed after successful user login is WantedBy
.
I also believe that the user systemd instance is started by pam_systemd
, which i believe happens before default.target
.
So it seems to me that if i use default.target
the timer will be activated after login. If i use OnStartupSec
in this case, will it correctly count the time from the startup of the systemd user instance?
On the other hand, if i use timers.target
, since this is a user timer, will it be activated before login and start counting the seconds from its activation time, or it will just register and start counting time only after systemd --user
is started?