Cronjob.de › Guides › Nextcloud

Setting up a Nextcloud cronjob: webcron instead of AJAX

Nextcloud does a fair amount in the background: indexing files, generating previews, emptying the trash, syncing federated shares, sending notifications. Without system access you switch to webcron mode and have cron.php called from outside.

Why at all

AJAX depends on logged-in users

By default Nextcloud runs in AJAX mode. Background jobs then only start while somebody has the web interface open. On an instance used by two people during the day and nobody at night, jobs pile up.

You notice it in small things: previews are missing, the trash never expires, calendar reminders arrive late, and the admin area warns that the last background job was a long time ago.

One thing to know before switching: in webcron mode Nextcloud runs exactly one job per call. At one call every five minutes that is 288 jobs a day. The vendor documentation considers that sufficient only for very small installations with a handful of users. At a one-minute interval you get 1,440 jobs a day, which goes considerably further.

URL to call
https://cloud.ihre-domain.de/cron.php
Recommended interval
every 5 minutes, every minute for more than a handful of users
Tested with
Nextcloud 27 bis 35
Sufficient Cronjob.de plan
Free for very small instances. From about five users the one-minute interval from Cronjob.de Plus pays off, because 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.

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

    Open https://cloud.your-domain.com/cron.php once. A blank page is correct. 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. For the five-minute interval select minutes 0, 5, 10 and so on, for the one-minute interval select all of them.

    */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 admin area

    After roughly ten minutes the background jobs warning disappears from the administration settings, and the time of the last successful run is shown there.

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 administration settings show when the last background job ran. If that timestamp is from the last few minutes, it works. The Cronjob.de call log additionally shows how long each call took. Values of several seconds point to a full queue, in which case a shorter interval makes sense.

FAQ

Common questions about Nextcloud

Why is only one job executed per call?
That is how webcron mode is built in Nextcloud: every call to cron.php takes exactly the next job from the queue. This limits the runtime of a single call, but it means the interval determines how much gets through overall.
Is webcron as good as a real system cron?
No, and the vendor documentation says so openly. A cron on the server itself remains the recommendation. Webcron is the documented route for everyone without that access, and perfectly sufficient for small instances.
Do I have to protect cron.php?
Nextcloud provides no key for it, the file is deliberately openly reachable. It only triggers background jobs and returns no data. If you still want to restrict it, you can limit access in the web server to our calling address.
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 September 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.