your troubleshooting step is very close to the right one but as your problem is related to cron you need
docker exec -u www-data nextcloud-cron-1 cat /var/www/html/data/.ncdata
or much easier with compose
docker compose exec -u www-data cron cat /var/www/html/data/.ncdata
please share the relevant configs - we don’t want to follow 10 different tutorial per day..
refers to
https://raw.githubusercontent.com/pimylifeup/compose/main/nextcloud/signed/compose.yaml
which in turn configures
app:
image: nextcloud:apache
..
volumes:
- ${STORAGE_LOCATION}:/var/www/html/data
- nextcloud:/var/www/html
...
cron:
image: nextcloud:apache
..
volumes:
- nextcloud:/var/www/html:z
..
as you can see cron container doesn’t mount data directory, which is required (cron must have same mounts as app).
you can find advanced working compose at How to docker-compose with notify_push (2024)