Nextcloud version (eg, 20.0.5): 21.0.3
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04 focal
Apache or nginx version (eg, Apache 2.4.25): nginx/1.18.0
PHP version (eg, 7.4): PHP 7.4.3
The issue you are facing:
On the Settings > Security & setup warnings:
Last background job execution ran 21 days ago. Something seems wrong. Check the background job settings.
Otherwise the instance seems to be running well.
Is this the first time you’ve seen this error? (Y/N): Y
Has this ever been solved?
I have a similar issue but when I run as www-data the command php -f /var/www/nextcloud/cron.php I see the following error message:
This version of Nextcloud is not compatible with PHP>=8.2.
You are currently running 8.2.5.
I am running NextCloudPi 25.0.5
NextCloudPi v1.52.0 is up to date
you must eather remove all php8.2 packages from your Pi:
sudo apt-get remove --purge *php8.2*
or set them manually to the php version (e.g. 8.0 or 8.1) with this command:
for linkgroup in $(ls /var/lib/dpkg/alternatives/ | grep -E "ph(ar|p)"); do sudo update-alternatives --config $linkgroup; done
controll, if all php-versions are switched to the version you want. I would recommend to not leave it in automatic mode but choosing the respective manual mode so that no unintentional version changes can take place, but only after your conscious change.
last possibility is to not run php -f but php$version -f instead (where $version must be replaced with 8.0 or 8.1 depending on which version you want to use - which of course has to be installed)
You can find out, which php-versions and -packages are installed on you system with:
The bottom line is the the error message is accurate: PHP 8.2 should not be installed. But it’s possible you ended up with it perhaps due to this recent issue in NCP.
for linkgroup in $(ls /var/lib/dpkg/alternatives/ | grep -E "ph(ar|p)");
do sudo update-alternatives --config $linkgroup; done
According to your suggestion, the above worked and the cronjobs are running again.
Let’s see what other obstacles I encounter, but thank you very much.