Closed astromechza closed 10 months ago
Thanks for your report. The [/usr/bin/cronjob](https://github.com/owncloud-docker/base/blob/master/v20.04/overlay/usr/bin/cronjob)
script has the ability to hook-in custom scripts by mounting scripts into the directory defined in OWNCLOUD_PRE_CRONJOB_PATH
and OWNCLOUD_POST_CRONJOB_PATH
.
To make this behavior useable with the helm chart, we could add extraVolume
and extraVolumeMounts
options to allow users to set custom volumes/mounts. This way, a simple script that executes /usr/lib/php/sessionclean
can be mounted from a configmap to the cronjob pre/post path. Would you like to contribute this?
@xoxys, sure that sounds like a good starting point. extraVolumeMounts
is pretty standardized these days among helm charts. PR coming soon.
Cool, thanks!
I found that my /mnt/data/sessions directory was filling up with old session files. up to 80k of them without any cleanup.
There's a crontab entry for it in cron.d, but that doesn't get called by anything, and not by the
occ system:cron
background jobs either.I solved this myself by adding a manual
cronjob
like below, but ideally we'd include this in the helm chart or make sure the existing helm chart calls it after running the owncloud/usr/bin/cronjob
file.