I run this from root cron... 00 4 * * * /sbin/fstrim -av
you can, of course, change the timing to whatever you want. HTH On Wed, 9 Feb 2022 at 17:57, Hamish McIntyre-Bhatty <d...@hamishmb.com> wrote: > Hi there, > > I believe a while back I was talking about TRIM here, more specifically > about it not running automatically on my systems, and I think someone > recommended I enable fstrim.service with systemd. > > I finally got around to that, only to find that it was already enabled, > and apparently not doing anything. As I don't leave my systems on 24/7, > is it safe to assume that the timer isn't firing when the system is > booted up later, after the configured time for TRIM has passed? > > If so, does anyone know how to configure a task like this to run when > scheduled, or alternatively when the system is next booted up in the > case that the event was missed? > > I know CRON can't do this, and I assumed the point of using systemd > timers was that they could do this, but alas perhaps not. I assume there > must be a standard way to do this, because it seems like a rather big > omission, considering that other commercial operating systems Who Must > Not Be Named (TM) seem to have had this feature for a while. > > Any ideas? > > Hamish > > > -- > Next meeting: Online, Jitsi, Tuesday, 2022-03-01 20:00 > Check to whom you are replying > Meetings, mailing list, IRC, ... http://dorset.lug.org.uk > New thread, don't hijack: mailto:dorset@mailman.lug.org.uk > -- Next meeting: Online, Jitsi, Tuesday, 2022-03-01 20:00 Check to whom you are replying Meetings, mailing list, IRC, ... http://dorset.lug.org.uk New thread, don't hijack: mailto:dorset@mailman.lug.org.uk