I want to start a command (unison) every 5 min as a systemd.service via a systemd.timer unit. The '.service' file alone runs fine. However when it's started by the timer unit, it runs multiple times and stops with these errors:
Start request repeated too quickly. and
Failed with result 'start-limit-hit'. But why?
I start the timer service like this:
systemctl --user start service.timer.
The files are located in:
[Unit] Description=Sync Service [Service] Type=oneshot ExecStart=/bin/zsh -l -c "unison -batch %u" ExecStartPost=/bin/zsh -l -c 'dunstify "sync ~"' [Install] WantedBy=graphical.target
[Unit] Description=Timer for Sync Service [Timer] OnCalendar=*-*-* *:0/5:* AccuracySec=5s [Install] WantedBy=timers.target
The unison command syncs over the network into a server via ssh with a password proteceted keyfile. A
ssh-agent instance is running by the user. That's why i have to use a login shell:
zsh -l -c "...".