[SOLVED] Fresh NC 22.1.0 install , strange crontab problems

New install and i just cannot get crontab working. I mean it might be working as /var/log/syslog says, but i cannot get WebUI show that everything is ok. Any tips?

Ubuntu 20.04 with PHP8.0 but I also installed php7.4-cli but nothing is helping to get Administration → Basic Settings “cron is ok”.

Some syslog msg show that they are run ok, by hand and by crontab, but WebUI doesn’t confirm that.

Aug 21 18:25:01 files CRON[3821]: (www-data) CMD (/usr/bin/php8.0 -f /var/www/nextcloud/cron.php)
Aug 21 18:25:01 files CRON[3820]: (www-data) CMD (php -f /var/www/nextcloud/cron.php)
Aug 21 18:47:01 files cron[1012]: (systemnextcloud) RELOAD (/etc/cron.d/nextcloud)
Aug 21 18:50:01 files CRON[6112]: (www-data) CMD (/usr/bin/php7.4 -f /var/www/nextcloud/cron.php)

Oh files upload didn’t work same time i’m writing this message, so here are images:

So you are running three cronjobs with 3 different php versions?

So you are on php 8, you can just run from command line and see if there are any errors:

sudo -u www-data /usr/bin/php8.0 -f /var/www/nextcloud/cron.php

I was just trying PHP7.4 also if nextcloud didn’t prefer PHP8.0.

I run this without errors, but still WebUI shows me " Some jobs haven’t been executed since 3 days ago. Please consider increasing the execution frequency."

root@files:~# sudo -u www-data /usr/bin/php8.0 -f /var/www/nextcloud/cron.php

OC\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)

root@files:~# dpkg -l | grep -i apcu
ii php-apcu-bc 1.0.5-13+ubuntu20.04.1+deb.sury.org+1 amd64 APCu Backwards Compatibility Module
ii php7.4-apcu 5.1.20+4.0.11-1+ubuntu20.04.1+deb.sury.org+1 amd64 APC User Cache for PHP
ii php7.4-apcu-bc 1.0.5-13+ubuntu20.04.1+deb.sury.org+1 amd64 APCu Backwards Compatibility Module
ii php8.0-apcu 5.1.20+4.0.11-1+ubuntu20.04.1+deb.sury.org+1 amd64 APC User Cache for PHP
root@files:~#

Or maybe problems is because i like to run PHP as php-fpm, should nextcloud to be run with
libapache2-mod-php only ?

root@files:~# ps -ef | grep fpm
root 1034 1 0 Aug21 ? 00:00:35 php-fpm: master process (/etc/php/8.0/fpm/php-fpm.conf)
www-data 160385 1034 1 21:10 ? 00:00:29 php-fpm: pool www
www-data 160622 1034 2 21:14 ? 00:00:55 php-fpm: pool www

root@files:~# cat /etc/cron.d/nexcloud
*/5 * * * * www-data /usr/bin/php8.0 -f /var/www/nextcloud/cron.php
root@files:~#

root@files:~# grep php8 /var/log/syslog
Aug 27 22:05:01 files CRON[161810]: (www-data) CMD (/usr/bin/php8.0 -f /var/www/nextcloud/cron.php)
root@files:~#

But still WebUI shows " Last job execution ran 30 minutes ago. Something seems wrong"

You just checked the first part if it is installed. Is it enable for CLI?

Thanks, fixed by adding apc.enable_cli=1 to the end:
/etc/php/8.0/cli/php.ini

I also find out that it was mentioned in document also…
https://docs.nextcloud.com/server/21/admin_manual/configuration_server/caching_configuration.html