I have Nextcloud installed, version Nextcloud Hub 10 (31.0.5)
Debian12
Coddy
I have the following problem, when including lines in crontab
*/5 * * * * php -f /home/waw555/www/nextcloud/cron.php
0 5 * * * php /home/waw555/www/nextcloud/occ preview:pre-generate
My server reboots every 12 hours exactly at 6am and 6pm.
If these lines are commented out, then the server reboot is disabled.
How can I remove the server reboot every 12 hours without disabling cron?
Is it a clean reboot or a crash? Check your journalctl output and/or /var/log output.
You might also check your Nextcloud log (possibly adjusting the log_level temporarily) to see what’s going on around that time frame. Instructions are in the support template you appear to have overlooked. Querying the jobs that ran via occ background-job:list might also turn something up.
Hi!
I ran each command and it completed in about 40 seconds.
I also started an experiment by turning on the above lines separately, and if you turn on the lines one by one, then the uptime is more than a day, but if you turn them on together, then the uptime is again 12 hours, the reboot occurs exactly at 6 am and at 6 pm. I can’t find the reason for the reboot yet.
There is nothing in the logs during the reboot, as if the machine turns off as if you turned off the power.
One cronjob runs every 5 mins. The other one just at 5 am. But your system crashes at 6 am, and 6 pm. 6 am your local time could be 5 am on the server (daylight saving time?), but there is no reason it makes the server reboot at 6 pm.
You could run the second cronjob at:
17 5 * * * php /home/waw555/www/nextcloud/occ preview:pre-generate
so it runs at 5:17 am, so after your regular cronjob, and at a very specific time (in case you still have reboots).