From 566ed34b3b34b96d6fd2bc1b14cc7723a8c8f6d0 Mon Sep 17 00:00:00 2001 From: timvisee Date: Wed, 5 May 2021 23:18:06 +0200 Subject: [PATCH] Update cronjob template, add example using expiry time in file name --- gc.cron | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gc.cron b/gc.cron index f043177..d6b1c8f 100644 --- a/gc.cron +++ b/gc.cron @@ -3,5 +3,11 @@ # # Run `crontab -e` and add the line below, and configure the correct path. -# Delete leaked Send upload files older than 1 day (and a bit) every hour -0 * * * * find /mnt/send01_volume/uploads/ -mmin +1450 -exec rm {} \; +# Delete leaked Send upload files older than 7 days (and a bit) every hour +0 * * * * find /var/lib/send/uploads/ -mmin +10130 -exec rm {} \; + +# Uploads have their lifetime in days prefixed, so you can be a little bit +# smarter with cleaning up: +# +# 0 * * * * find /var/lib/send/uploads/ -name 7-\* -mmin +10130 -exec rm {} \; +# 0 * * * * find /var/lib/send/uploads/ -name 1-\* -mmin +1500 -exec rm {} \;