I use this now
cron:
image: nextcloud
container_name: nextcloud-cron
restart: unless-stopped
depends_on:
- app
# env_file:
# - ./nextcloud.env
# - ./db.env
volumes:
- type: volume
source: nextcloud_app.persistent
target: /var/www/html
read_only: false
- type: volume
source: nextcloud_data.persistent
target: /var/www/html/data
read_only: false
entrypoint: /cron.sh
(Had to comment out the .env files, since I don’t have them). It starts fine, the logs of nextcloud-cron says:
nextcloud-cron
crond: crond (busybox 1.35.0) started, log level 0
crond: user:www-data entry:(null)
100001000010000100001000010000100001000010000100001000010000
111111111111111111111111
11111111111111111111111111111111
111111111111
1111111
crond: crond (busybox 1.35.0) started, log level 0
crond: user:www-data entry:(null)
100001000010000100001000010000100001000010000100001000010000
111111111111111111111111
11111111111111111111111111111111
111111111111
1111111
crond: user:www-data entry:(null)
100001000010000100001000010000100001000010000100001000010000
111111111111111111111111
11111111111111111111111111111111
111111111111
1111111
crond: wakeup dt=18
crond: file www-data:
crond: line php -f /var/www/html/cron.php
crond: wakeup dt=60
crond: file www-data:
crond: line php -f /var/www/html/cron.php
crond: wakeup dt=60
crond: file www-data:
crond: line php -f /var/www/html/cron.php
crond: wakeup dt=60
crond: file www-data:
crond: line php -f /var/www/html/cron.php
crond: job: 0 php -f /var/www/html/cron.php
crond: child running /bin/bash
crond: USER www-data pid 13 cmd php -f /var/www/html/cron.php
crond: wakeup dt=10
crond: crond (busybox 1.35.0) started, log level 0
crond: user:www-data entry:(null)
100001000010000100001000010000100001000010000100001000010000
111111111111111111111111
11111111111111111111111111111111
111111111111
1111111
crond: user:www-data entry:(null)
100001000010000100001000010000100001000010000100001000010000
111111111111111111111111
11111111111111111111111111111111
111111111111
1111111
crond: wakeup dt=50
crond: file www-data:
crond: line php -f /var/www/html/cron.php
crond: wakeup dt=60
crond: file www-data:
crond: line php -f /var/www/html/cron.php
crond: wakeup dt=60
crond: file www-data:
crond: line php -f /var/www/html/cron.php
crond: wakeup dt=60
crond: file www-data:
crond: line php -f /var/www/html/cron.php
crond: job: 0 php -f /var/www/html/cron.php
crond: child running /bin/bash
crond: USER www-data pid 12 cmd php -f /var/www/html/cron.php
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: file www-data:
crond: line php -f /var/www/html/cron.php
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: file www-data:
crond: line php -f /var/www/html/cron.php
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: file www-data:
crond: line php -f /var/www/html/cron.php
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: file www-data:
crond: line php -f /var/www/html/cron.php
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: file www-data:
crond: line php -f /var/www/html/cron.php
crond: job: 12 php -f /var/www/html/cron.php
crond: user www-data: process already running: php -f /var/www/html/cron.php
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: wakeup dt=10
crond: crond (busybox 1.35.0) started, log level 0
crond: user:www-data entry:(null)
100001000010000100001000010000100001000010000100001000010000
111111111111111111111111
11111111111111111111111111111111
111111111111
1111111
crond: user:www-data entry:(null)
100001000010000100001000010000100001000010000100001000010000
111111111111111111111111
11111111111111111111111111111111
111111111111
1111111
crond: wakeup dt=4
crond: file www-data:
crond: line php -f /var/www/html/cron.php
But when checking the issues as admin on the nextcloud instance it says there’s an error with cron and it hasn’t been run for many days. I have selected cron as the service to run background jobs with. How can I trouble shoot?