Cron.php seems to do nothing

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • Version 32.0.1
  • Operating system and version (e.g., Ubuntu 24.04):
    • Linux 6.8.0-136-generic x86_64
  • Web server and version (e.g, Apache 2.4.25):
    • Server at All-Inkl
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • unknown
  • PHP version (e.g, 8.3):
    • 8.3
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • directly after installation
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • download an unzipping in webspace
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no

Summary of the issue you are facing:

Calling the cron.php seems not to do anything but it returns “success”.

I see the message, that some jobs are not executed sind 5 Months. But I first recognized it after installing and using the News App. The news from an RSS-Feed were updated once (when I created the channel in my NC-Instance). After that, the news aren’t updated.

Steps to replicate it (hint: details matter!):

  1. Copy RSS-Feeed from dedicated webpage

  2. Put it into the News Dialog for “Abonnieren”

  3. Read all the News

  4. Wait one Day

  5. Trayining to read the next news

  6. - → nothing happend

Log entries

I have configured the Webcron as an Update mechanism because I want to have the news updated when I arrive on the webpage. I don’t want to have the update process started when I arrive.

And the system cron doesn’t work at All-Inkl Provider.

Hi @DreiBaer,

first, what webcron actually is, because that is where your symptom comes from, and I will be honest that I have little love for it. A call to cron.php over a URL runs exactly one single job per call, nothing more. It is the crutch among the three methods, not something Nextcloud recommends beyond the smallest setups, the documentation caps it at about 288 jobs a day at one call every five minutes and calls that “only suitable for very small instances”:

That one-job-per-call is the whole story. Opening cron.php in the browser yourself returns success and quietly runs a single job, which is why it looks like nothing happens, and if the URL is not hit on a tight schedule the queue barely moves, so a job like the News feed updater almost never comes round. Months of jobs sitting untouched is exactly that.

The clean answer would be system cron, the method Nextcloud actually recommends, which works through the whole queue on each run, and on a normal host I would simply tell you to switch to it. The catch, and I am judging this purely from the links below, I have not run All-Inkl myself, is that All-Inkl has no real cron at all. Their cronjob feature only calls a URL over HTTPS, there is no shell to run php -f cron.php, so even on a paid tariff it is still webcron underneath. Their tutorial spells out the HTTP-only part:

and the German-language Nextcloud thread where users reach the same conclusion is here:

Two things follow. First, that cronjob feature is not in All-Inkl’s smallest package, so check that your tariff even includes it. If it does not, then nothing is scheduling the call in the first place and that alone would explain the silence, you would only ever be triggering cron.php by hand. If this instance matters to you, take a tariff that has the feature. Second, do not expect it to behave like proper cron even then, it stays one job per call.

So webcron is what you are stuck with on this host. Which makes the one thing that has to be right the frequency. It needs an actual scheduled KAS cronjob pointing at your cron.php URL, firing every five minutes at the very least and more often if All-Inkl lets you set a shorter interval, not you opening it now and then. If the Nextcloud folder sits behind directory protection, put the username and password into the cronjob’s advanced settings too, otherwise every call just gets a 401 and does nothing, which would look exactly like this.

One caveat so it does not confuse you further, under webcron Nextcloud does not always show a correct “last ran” time in the admin panel, so do not trust that field on its own, go by whether the feeds actually refresh or look at occ background-job:list. And if the queue still will not move, check that list for a job stuck at the front with an old reservation, it can hold up all the rest.

h.t.h.


ernolf

See: