Is a cronjob needed for cron.php if I have installed Nextcloud via snap? It seems to be running a cron.php job every so often even without an entry in crontab, although not every 5 minutes, the interval varies.
If I add a cronjob to the root’s crontab, logs show it runs every 5 minutes, but the Nextcloud web UI still shows that it does not - it reports a random variable interval, sometimes I look at it and it says ran 2 minutes ago, sometimes it goes 30 minutes without running (at least as far as the web UI reports).
The main issue I have is that calendar emails & push notifications are not consistent. They are generally delivered after the time they are set for. This becomes a problem for short-notice calendar additions - e.g. if I add an item for, say, 2 hours from now, and I want a notification 10-20 minutes before the event, the email might arrive after the event start time, which I believe is due to this randomly variable cron interval.
The snap runs as root, so I figured the cron should run as root too… is that not right?
Edit: it even tells me in the admin panel: The cron.php needs to be executed by the system user “root”.
So the cron job is needed for a snap install then? And would anyone have any insight on why the admin panel shows that it runs are random intervals way past the 5 minutes?
It started running the job every 5 minutes, but after a while it stopped running it. Cron log shows “session opened for user root” and “session closed for user root” every 5 minutes, but nothing running in between.
I am no expert either, but as far as I understand, the snap runs as one unit under root, and it includes everything Nextcloud needs to run inside the snap, including apache, php etc. So they all run as root inside the snap. The snap is running its own apache instance. This shows in ps as running under the root user.
Yeah snaps are horrible for troubleshooting and customisation, as I am finding out. However, I did try to install Nextcloud manually but came up with a lot of problems that the snap just doesn’t have as it’s pre-configured to just work out of the box.
The nextcloud.log in my data folder is actually empty. In a snap install occ is run like ‘nextcloud.occ’, and it runs fine for whatever occ commands I’ve had to use.