I am just wondering about synchronization of systemd timers / related units. I have a backup script running hourly / daily / weekly. I use timers with Persistent=True and OnCalendar=... options set to launch the units. The problem is that systemd launches multiple units at once if units were missed due to the machine being turned off. Since this could cause problems the script uses a lockfile to make sure there is only one instance running at any time: If the lockfile is present while executing the script fails and no backup is performed. I was just wondering if there is a way in systemd to ensure that jobs are not run in parallel (I seem to remember that this was possible in anacron) to avoid this situation.Edit: The unit file (rsnapshot@.service) looks like this: [Unit]Description=rsnapshot (%I) backup[Service]Type=oneshotNice=19IOSchedulingClass=3ExecStart=/usr/bin/rsnapshot %IAn example timer is here (rsnapshot-hourly.timer):[Unit]Description=rsnapshot hourly backup[Timer]OnCalendar=hourlyPersistent=trueUnit=rsnapshot@hourly.service[Install]WantedBy=timers.targetA running service looks like this (systemctl status rsnapshot@daily.service): rsnapshot@daily.service - rsnapshot (daily) backup   Loaded: loaded (/etc/systemd/system/rsnapshot@.service; static; vendor preset: disabled)   Active: activating (start) since Do 2015-07-23 21:42:03 CEST; 1min 2s ago Main PID: 527 (rsnapshot)   CGroup: /system.slice/system-rsnapshot.slice/rsnapshot@daily.service           527 /usr/bin/perl -w /usr/bin/rsnapshot daily           560 /bin/rm -rf /media/large_store/backup/bigbox/daily.6/
Synchronize systemd unit based on timers
systemd