I have the following cronjob setup
@daily /root/trim.sh
/root/trim.sh
fstrim -av
but it just doesn't run. It does when run /root/trim.sh
manually. It has chmod +x
permissions. What is causing this?
I have the following cronjob setup
@daily /root/trim.sh
/root/trim.sh
fstrim -av
but it just doesn't run. It does when run /root/trim.sh
manually. It has chmod +x
permissions. What is causing this?
/sbin
was missing /sbin/fstrim -av
fstrim
already has SystemD timer /lib/systemd/system/fstrim.timer
for this purpose running weekly, which is enough.
– N0rbert
Jun 02 '20 at 07:48
/sbin
is not in the cron path; try changing the script to/sbin/fstrim -av
or define an appropriatePATH
– steeldriver Jun 01 '20 at 20:51