from email@example.com to firstname.lastname@example.org on 07 Dec 2023 11:06
I try to create a timer unit for weekly and daily backups. For example with the weekly unit, it should be executed once in a week, some minutes after login. If the unit was successful, it should shutdown and not start again until the next week. If a start of this unit was missing, it should be start again some minutes after the next login.
But for some unknown reason, the current unit starts after every login when I reboot the laptop. I am relatively sure that this timer unit is set up wrong, but unfortunately I don’t know how I can implement such a unit better with the functions mentioned above.
[Unit] Description=Run backup weekly Requires=backup.service [Timer] Unit=backup.service OnCalendar=weekly RandomizedDelaySec=120 Persistent=true [Install] WantedBy=timers.target