Cron does not seem to be running, Web UI has error " Some jobs have not been executed since a day ago. Please consider increasing the execution frequency. "

I’ve followed this doc page in detail: Background jobs — Nextcloud latest Administration Manual latest documentation

as well as this youtube video: https://www.youtube.com/watch?v=gJ7NODMb-r8

I am still having an issue where cron does not appear to be running as the UI still shows a warning " Some jobs have not been executed since a day ago. Please consider increasing the execution frequency." under the Background Jobs page.

I have run the initial crontab command with the tag “-u www-data” as this matches the fine print " The cron.php needs to be executed by the system account “www-data”." that appears in the web UI.

I have added the apc.enable command so that the command is:
*/5 * * * * /usr/bin/php8.3 --define apc.enable_cli=1 -f /var/www/html/cron.php

I have also ran “crontab -u www-data -l” and I do get the return
[snip]
*/5 * * * * php -f /var/www/nextcloud/cron.php

I have also ran “sudo -u www-data php /var/www/html/cron.php” to try and manually run, but the error still remains.

I have also set my log level to 1, to check for any errors related to cron, but nothing is appearing.

What might the issue be?

Unclear why you use a cron job for those. You enable most on the server once.

Try an PHP undependend command:
/usr/bin/wget -O /dev/null -q https://cloud.yourdomain.xx/cron.php
/usr/bin/wget -O /dev/null -q https://cloud.yourdomain.xx/occ dav:send-event-reminders
The last one is for the calendars to send allerts.
You can enter these commands SSH to test. Leave out -q then to see what happens.

Because it’s the recommended way to do it… Background jobs — Nextcloud latest Administration Manual latest documentation

What OS have you installed Nextcloud on, and what installation method did you use?

Also, the paths in the crontab and the paths in the commands you posted don’t match. So where is Nextcloud actually installed?

In /var/www/html, in /var/www/nextcloud, or maybe somwhere else…?

1 Like

Hi, I have installed Nextcloud on my Ubuntu server. The guide I used was on the docs: “Example installation on Ubuntu 22.04 LTS — Nextcloud latest Administration Manual latest documentation”, I directly downloaded the latest version, and the extracted the zip, and then ran some installation command that populated files such as config.php.

I am certain that nextcloud is installed in /var/ww/html, not in /var/www/nextcloud (I’m aware that the docs has it installed in /var/www/nextcloud).

When I run “crontab -u www-data -l”, I do get “*/5 * * * * /usr/bin/php8.3 --define apc.enable_cli=1 -f /var/www/html/cron.php” as a return which the docs says can be used to verify cron is running.

Edit: it appears that it’s running correctly now, or at least the message is updating saying that it ran in the last 5 minutes.

I’m not sure what I did to fix, I tried a few more things (resetting some settings, readding flags, etc), to anyone with a similar future problem I can only recommend following the docs exactly…

1 Like