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

Richard Hector richard at walnut.gen.nz
Wed Jul 29 09:29:33 UTC 2020


On 29/07/20 4:13 am, Ian Pilcher wrote:
> On 7/28/20 11:07 AM, Mantas Mikulėnas wrote:
>> I'd create a single raidcheck.service that runs daily and calls a
>> script that itself determines which device to check, e.g.
>> /dev/md$[dayofyear % 16].
> 
> That is the approach that I'm taking, although it means a fair bit of
> work.  I need to parse a configuration file, do a bunch of date-related
> math, etc., as I don't really want to hard-code the number of RAID
> devices into a C program.

Why not just record which one you've just finished, then next time, read
that and do the next in the sequence?

Richard


More information about the systemd-devel mailing list