Closed zwb124 closed 2 years ago
What about using find
as cronjob?
Example:
# delete thumbnails created before one hour:
find /tmp/my_mpv_thumbnails -mmin +60 -exec rm -r '{}' +
# delete thumbnails created before one day:
find /tmp/my_mpv_thumbnails -mtime +1 -exec rm -r '{}' +
# delete thumbnails accessed before one hour:
find /tmp/my_mpv_thumbnails -amin +60 -exec rm -r '{}' +
# delete thumbnails accessed before one day:
find /tmp/my_mpv_thumbnails -atime +1 -exec rm -r '{}' +
To run it hourly by cron put the line you want into crontab -e:
# mm hh DD MM W cmd
0 * * * * find [...]
make sure your cron service runs (eg. systemctl status cronie.service)
thanks
You can add a script to automatically delete the thumbnails of a few days ago, thanks!