I have been reading about people setting up a cron job to do fstrim
on their SSDs on a daily/weekly basis.
So, here are my questions:
- Is it feasible to run
cron
if my laptop doesn’t have 100% uptime? As in, does it manage to run, for example, a weekly job if my computer is shut down at the start of its week and I then turn it on? - Do I need to run
fstrim
? Duckduckgoing about it has left me a bit confused. Void Linux (the ditro I use) doesn’t do it by default I am sure.
cron
won’t do that. You can useanacron
orsystemd
timers to handle those scenarios.fstrim
can be—or used to be—nicer than filesystem options because trimming is/used to be an operation that didn’t queue properly, so doing it in bulk when you’re not using it can be better. But who knows, maybe this is better nowadays. I guess it can increase your chances of doing “recover removed files”-kind of operations successfully if you haven’t trimmed the device [automatically by the filesystem].Based. Thanks a lot. Another alternative is
snooze
(Github link).