Cron job not working nextcloud25.0.3

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 25.0.3
Operating system and version (eg, Ubuntu 20.04): debian11
Apache or nginx version (eg, Apache 2.4.25): nginx/1.18.0
PHP version (eg, 7.4): 8.1

The issue you are facing:

Hi everybody,

Since upgrade to nextcloud 25.0.3 and php 8.1 on a debian 11 and nginx instance, i have a issue with cronjob.

I believe have tuned fine in /etc/php/X.X/mods-available/apcu.ini
with : extension=apcu.so and apc.enable_cli=1
and */5 * * * * php -f /var/www/nextcloud/cron.php --define apc.enable_cli=1 in crontab.

The cron job seems to run for about several minutes and then : La dernière exécution de la tâche a duré il y a 11 minutes. Quelque chose semble dysfonctionner.

If someone has an idea it will be fine.

Thanks a lot for your time.

Apologise my poor english.

Best regards

Is this the first time you’ve seen this error? (Y/N):

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

PASTE HERE

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

PASTE HERE


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE

I found the solution :

In cron : */5 * * * * php8.1 -f /var/www/nextcloud/cron.php --define apc.enable_cli=1 in crontab.

Must specifie the php version you use after an update of just php version.

Hope it helps other.