After installing Nextcloud you need to setup a cron to run the jobs.
AJAX is the default, and runs every time you move around the site. It ends up being slow.
On the Nextcloud basic settings page you have available 3 options:
Since I am running Nextcloud inside a docker, I decided to give a try to the
Cron option and calling docker exec:
docker exec -ti nextcloud su -p www-data -s /bin/sh -c "php cron.php"
But performance was not great since every time the task ran, it blocked the site until it ended.
I opted to call instead the
Webcron with the following on my server cron file:
*/5 * * * * root curl https://[nextcloud-url]/cron.php | logger
logger will output the response of the cron to
syslog and can be helpful to debug. Feel free to remove it.
And its working great, without locking the server every time it rans 🙂