Running as a systemd.timer

vdirsyncer includes unit files to run at an interval (by default every 15±5 minutes).


These are not installed when installing via pip, only via distribution packages. If you installed via pip, or your distribution doesn’t ship systemd unit files, you’ll need to download vdirsyncer.service and vdirsyncer.timer into either /etc/systemd/user/ or ~/.local/share/systemd/user.


To activate the timer, just run systemctl --user enable vdirsyncer.timer. To see logs of previous runs, use journalctl --user -u vdirsyncer.


It’s quite possible that the default “every fifteen minutes” interval isn’t to your liking. No default will suit everybody, but this is configurable by simply running:

systemctl --user edit vdirsyncer.timer

This will open a blank editor, where you can override the timer by including:

OnBootSec=5m  # This is how long after boot the first run takes place.
OnUnitActiveSec=15m  # This is how often subsequent runs take place.