nextcloud/docker

Easy way to change cron frequency

Saphyel opened this issue · 1 comments

I was wondering if there's an easy way to change the default cronjob of every 5mins to something more customizable.
Some projects/clients may want a refresh every min other may want every 30mins..

I'm aware that docker compose does not support schedule but if could be a solution to be as easy as an ENV VAR or replace the cmd/entrypoint it would be nice

Some projects/clients may want a refresh every min other may want every 30mins..

I presume by "refresh" you're referring to picking up externally added files. Keep in mind the Nextcloud Background Jobs do way more than that since they're used for handling all sorts of internal tasks.

occ background-job:list

but if could be a solution to be as easy as an ENV VAR or replace the cmd/entrypoint it would be nice

You can customize the Dockerfile to your heart's content locally:

echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data