Hello, everybody.
So I want to setup a weekly cron (using cronie) job to trim my nvme drive. I copypasted an fstrim script from Ubuntu (allegedly) to /etc/cron.weekly
#!/bin/sh
# trim all mounted file systems which support it
/sbin/fstrim --all || true
and haven't done anything else. Should that suffice? (I do realize that I need to start/enable a service)
The file you have placed in /etc/cron.weekly needs to be executable.
Ok, I made it executable. Now I just enable the process and it'll work fine?
If you mean cronie then yes it should execute weekly if you enable cronie.
If you want to be sure your cron job is being executed you could add
touch /root/it_worked
to the end of your script and if the file it_worked appears in /root it was.
or look in the logs for cron if you have logging setup.
Ok, thanks for helping me out!