Systemd – Run User’s Timer Without Open Session

systemdsystemd-timer

Are per user running for offline users ? If not, is it possible to allow them to be running for users within a specific group ? Will the target service of the timer be launched correctly as the user it is supposed to run for this way ?

Best Answer

A quick search for [systemd users] found this answer as the first result for you:

The systemd user instance is started after the first login of a user and killed after the last session of the user is closed. Sometimes it may be useful to start it right after boot, and keep the systemd user instance running after the last session closes, for instance to have some user process running without any open session. Lingering is used to that effect. Use the following command to enable lingering for specific user:

# loginctl enable-linger username

Enable this as a group level does not appear to be supported. Instead, enable it for every member of the group.

Related Question