Closed djdd87 closed 2 years ago
a little Workaround: Install the Docker Image ofelia and make a job like:
[job-exec "synoai delete"]
schedule = @every 3h
container = synoai
command = find /app/Captures -iname "*" -mtime +14 -delete
@AlexanderSch90 Nice workaround, thanks. Can you explain the command ? Say if I want to clean up every month all captures older than 30 days would that work ?
[job-exec "synoai delete"] schedule = @monthly container = synoai command = find /app/Captures -iname "*" -mtime +30 -delete
Sure but monthly + 30 days is nearly 2 month. I would use @daily
@AlexanderSch90 coming back for some help, I cannot make ofelia work... Seems like a socket issue but I don't what what to do with this suggestion, can you help ? Thanks
I think it is a Problem with Synology Docker. I run this on an Real Docker Server. Sry no idea...
Found another way to do it using the synology task scheduler. For those who need it here is the command used :
find /volume1/docker/synoAI/captureDir -type f ! -mtime -30 -exec rm {} \;
From reddit comment: