Something happened on the fist attempt to post this, so sorry or the duplicate entry.
Before setting up my Docker based NextCloud server I am trying to gain some more understanding about background jobs in NextCloud, their role and and proper configuration. From what I have read the background jobs are an important component to running a NextCloud instance efficiently and the preferred method for for executing them is using Cron. I also found this nice blog on various ways to set up cron jobs. I really hope someone can help me answer some of the (quite possibly noob-) questions below so that I can better understand this topic.
-
From what Iāve gathered all the background jobs are defined in cron.php. Does this file contain a set of ādefaultā tasks that should be run regardless of the NextCloud instance setup? If so, what sort of task are they.
-
The NC docs, mentions that some tasks should be run at different times. I might be missing something here, but if running the cron.php file with cron will not all the tasks in the script be executed at the same time?
-
Using Docker it seems the preferred way to running Cron is in an additional container. I do not fully understand the separation or interaction between the main NC container and the NC cron container. Is the cron container where I would define the scheduled cron job which would trigger the cron.php script located in the main NC container? Why does this container have to be built from and NC image if it only running crontab?
-
The suggested docker-compose file for the NC cron container contains this configuration,
entrypoint: /cron.sh
. Iām not sure what this line actually do. Will it execute a cron.sh file on container startup? Where is this file and what does it do? -
How do I find out when I need to- and how to- extend cron.php with additional task? Are there code snippets documented somewhere to extend to the bacground jobs scrip for certain NC addons etc?