[systemd-devel] systemd.timer every X days?

Ian Pilcher arequipeno at gmail.com
Sun Jul 26 19:56:28 UTC 2020


My NAS has 16 MD RAID devices.  I've created a simple service
(raidcheck at .service) that will trigger a check of the RAID device
identified by the argument.  E.g., 'systemctl start raidcheck at md1' will
trigger the check of md1 (after checking that no other array is being
checked/synced, no arrays are degraded, etc.).

It takes 6-8 hours to check one of these arrays, so I want to run one
check every night at 23:00.  So (picking tonight as an arbitrary
starting point) md1 would run tonight, md2 would run tomorrow night, md3
would run the following night ... all the way through md16.  Then the
cycle would start over with md1.

I had thought that I would be able to create 16 separate timers (one for
each device), each scheduled to trigger every 16 days at 23:00, starting
on a particular day.

Looking through the systemd.timer(5) and systemd.time(7) man pages,
however, I haven't been able to figure out how to do this.  Is it not
possible, or am I missing something?

-- 
========================================================================
                  In Soviet Russia, Google searches you!
========================================================================



More information about the systemd-devel mailing list