Skip to content

Cronjob.de › Guides › Nextcloud

Setting up a Nextcloud cronjob: webcron instead of AJAX

Without command line access you switch Nextcloud to “Webcron” in the administration settings and have https://cloud.your-domain.com/cron.php called regularly, for example every five minutes. Nextcloud answers with {"status":"success"}. At Cronjob.de you just enter the address and click the schedule.

Updated:

Why at all

AJAX depends on page visits

Nextcloud knows three ways to run background jobs: AJAX, Webcron and Cron. AJAX is the default but, according to the documentation, the least reliable: each time someone visits the Nextcloud page, a single background job is executed. If nobody uses the web interface, the work piles up. The recommendation is Cron, a scheduler on the server itself.

You notice a backlog in small things: previews are missing, the trash never expires, reminders arrive late, and the administration settings warn that the last background job was a long time ago.

Webcron is the documented route for everyone without server access: an outside service calls cron.php regularly. One thing to know: Nextcloud runs only one job per call. At one call every five minutes that is 288 jobs a day according to the documentation, suitable only for very small instances (1 to 5 users, depending on usage). At a one-minute interval it is 1,440 a day.

URL to call
https://cloud.ihre-domain.de/cron.php
Recommended interval
every 5 minutes, every minute for more users
Tested with
Nextcloud 27 bis 35
Sufficient Cronjob.de plan
Free for very small instances at a five-minute interval. With Cronjob.de Plus (€17.88 a year) you get the one-minute interval, so five times as many jobs get through.

Setup

Step by step

The AI does it faster

You do not have to transfer any of this by hand. Paste this guide – or the one for your own system – into the assistant, and Cronjob.de fills in address, method, schedule and headers. Where something is unclear it asks instead of guessing. At the end you see what was entered and create the job with one click.

Included in the free plan at no extra cost. You will find it after signing in under "Cronjobs" → "Create with AI".

  1. Switch on webcron mode

    Sign in as an administrator and open the administration settings, basic settings section. Under background jobs select “Webcron”. If you have command line access you can use the following command instead. Important: if the mode is set to “Cron”, calling cron.php through the address does nothing.

    sudo -E -u www-data php occ background:webcron
  2. Check the address in a browser

    Open https://cloud.your-domain.com/cron.php once. The short response {"status":"success"} is correct. If it says "status":"error", a message with the reason follows. If your Nextcloud lives in a subdirectory, that belongs in the address too.

  3. Create the cronjob at Cronjob.de

    Enter the address and pick the schedule: “every 5 minutes” or, from Plus, “every minute”. You can also describe the interval in one sentence; there is nothing to program.

    */5 * * * *

    You can enter this expression at Cronjob.de exactly as it is – the schedule field understands crontab notation. But you do not have to know it: simply click the schedule together instead.

  4. Check the result in the administration settings

    After a few minutes the background jobs warning disappears, and the basic settings show the time of the last run.

What the five fields of an expression like */5 * * * * mean is explained in the crontab reference – with examples and the most common pitfalls. You can build the expression in the crontab generator. Whether you need an outside service at all is shown in the comparison of the three ways.

Verification

Is it actually running?

The basic settings in the administration show when the last background job ran. If that was only a few minutes ago, it works. The Cronjob.de call log additionally shows the status code and runtime of every call, and from Plus also the response. If previews or reminders still lag behind despite regular calls, the interval is too coarse for your instance. Then the one-minute interval or a cron on the server helps.

FAQ

Common questions about Nextcloud

What is the difference between AJAX, Webcron and Cron in Nextcloud?
With AJAX one job runs per page visit, and without visits nothing runs. With Webcron an outside service calls cron.php, one job per call. With Cron the server itself starts cron.php on the command line, without the web server's limits. Nextcloud recommends Cron.
Why is only one job executed per call?
According to the Nextcloud documentation, the web server usually limits resources for webcron. To avoid jobs being cut off halfway, Nextcloud runs only one per call. The interval therefore determines how much gets through overall.
Is webcron as good as a real system cron?
No, and the documentation says so openly. Cron on the server remains the recommendation. Webcron is the documented route for everyone without that access and, according to the docs, suitable for very small instances.
Do I have to protect cron.php?
Nextcloud provides no key for it; the address is meant for webcron services. It only triggers background jobs and returns just a short status message. If you still want to restrict it, you can limit access in the web server to the Cronjob.de server addresses listed in our FAQ.
My Nextcloud lives in a subfolder.
Then the address is for example https://your-domain.com/nextcloud/cron.php. What matters is the path under which you also reach the login page.
Is your server rejecting our calls? Error 403 almost always comes from a firewall, a security plugin or directory protection – not from your script. All our calls carry the fixed identifier Cronjob.de in the user agent. Ask your host for an exception for it; that is more reliable than allowing IP addresses, because ours can change. Addresses and details in the FAQ. Other errors such as 401, 404 or 500 are explained in the troubleshooting guide.

Create your cronjob now

Create an account, enter the address, click the schedule. Five cronjobs are free forever, the first 14 days run on the Unlimited plan.

Start for free See pricing

More guides

Official documentation of Nextcloud

The details about Nextcloud come from their own documentation, as of October 2026. Please check there whether anything has changed since. Nextcloud is a trademark of its respective owner. This guide comes from Cronjob.de and has no business relationship with that provider.

By Joscha Schultze, operator of Cronjob.de · Written with AI assistance, provider details checked against their official pages.