Creating a systemd timer as a user on Debian 9.9

To set up a simple systemd timer as a user on Debian 9.9, here are the following steps to make it work.

Systemd version :

systemctl --version
systemd 232

As a user, both the .service unit and .timer unit must be located in $HOME/.config/systemd/user.
If this folder does not exist, create it :

mkdir -p $HOME/.config/systemd/user

If both the .service and .timer files are named as test, it must be enabled and started :


systemctl --user enable test

systemctl --user start test

The expected output should be found using journalctl :

journalctl -f

References :

https://wiki.archlinux.org/index.php/Systemd/Timers

systemd.time(7) manpage

Using systemd as a user

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.