Sudo wwwrun error: expired password

Well, I think that is a good crontab entry. So yes, better check the PHP script. You have correctly only absolute paths in your entry. Also in the script? Just an idea.

And for debugging the script: add some print commands to stderr at some crucial points. But I assume that is not a new idea to you :wink:

I asked in the nextcloud forum, and the advice me to set the error level to 0 in the nextcloud config and I found this

  "reqId": "Es8WnzHlnlEBCPtO8j5b",
  "level": 0,
  "time": "2023-03-23T23:01:46+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "cron",
  "method": "",
  "url": "--",
  "message": "Run OCA\\Maps\\BackgroundJob\\AddPhotoJob job with ID 6563",
  "userAgent": "--",
  "version": "23.0.12.2",
  "data": {
    "app": "cron"

And I saw here, That what was causing the problem was the maps app. I removed it and the cron run… it took some hours to finish it work … anyway the log I did is empty, cron.php put all it output to /srv/www/htdocs/nextcloud/data/nextcloud.log, so I have left the crontab like this

aldebaran:/srv/www/htdocs/nextcloud # crontab -u wwwrun -l
*/5 * * * * /usr/bin/php -f  /srv/www/htdocs/nextcloud/cron.php 

I have then reinstalled the maps app and it seems all is working and there is no cron fail.

I do not understand all the nextcloud details you post, but I understand that things now work to your satisfaction. Congratulations.