WordPress Cron: When to Replace WP-Cron with Server Cron

Illustrated infographic summarizing: WordPress Cron: When to Replace WP-Cron with Server Cron

By Greg Nowak. Updated 25 October 2026.

A scheduled article needs to be live before the campaign email goes out. A stock import needs to finish before the morning rush. If someone on your team keeps checking whether WordPress did its scheduled work, the scheduler deserves attention.

Replace the default WP-Cron trigger when unpredictable delays create customer problems or recurring manual work. Start by checking what your host already provides: an existing scheduler may need fixing rather than replacing.

What is WP-Cron, in short?

WP-Cron is WordPress's built-in scheduler for jobs such as scheduled posts, update checks and plugin tasks. It has no clock of its own. When a request reaches WordPress and a job is due, WordPress fires a quick background request to wp-cron.php?doing_wp_cron=<timestamp>, which runs the due jobs, at most about once a minute. No visitors means no runs, and a blocked request to itself means no runs either. Replacing it takes two steps:

// wp-config.php
define( 'DISABLE_WP_CRON', true );

# crontab of the site's user: every 5 minutes
*/5 * * * * /usr/local/bin/wp cron event run --due-now --path=/var/www/example.com

The rest of this page is about when that switch is worth it and how to verify it.

What changes when you use server cron?

Default WP-Cron checks for due tasks when requests reach WordPress. During quiet periods, work can wait for the next request. Server cron supplies a regular trigger, while WordPress and its plugins continue managing scheduled events.

You are changing how processing starts. A reliable trigger cannot repair a broken plugin callback, speed up a slow stock feed, or guarantee when an external service will finish.

When is the switch worth it?

Judge the cost of lateness before looking at visitor numbers. A small membership site may have stricter deadlines than a busy brochure site. Ask what happens if a task runs five minutes late, an hour late, or tomorrow.

Your situation Suggested approach Check before deciding
Brochure site with routine housekeeping Keep default WP-Cron if delays are acceptable Does anything depend on a deadline?
Scheduled publishing or regular imports Consider a five-minute server trigger Can the workflow tolerate that wait plus processing time?
Renewals, stock updates, or customer notices Use a monitored scheduler; assess one-minute triggering How will you detect overdue or failed work?
Host already manages scheduling Verify the existing setup Frequency, site coverage, logs, and ownership
Backlog grows despite regular runs Investigate errors and processing capacity Is work arriving faster than it finishes?
Starting points, not guarantees: choose the interval from acceptable delay and measured runtime.

A five-minute schedule can leave a newly due event waiting almost five minutes before it starts. Leave room for processing time when planning a campaign or operational deadline.

Prepare a migration you can verify

Write down the important workflows in business language: publish an article, update stock, send a reminder, synchronise a contact. Record the acceptable delay, evidence of completion, and owner for each. Your implementer can then map them to plugin hooks or queues.

Keep a configuration backup and choose a verification task whose effects you understand. Running overdue work can send emails or trigger other customer actions.

  1. Prepare the replacement schedule, execution account, paths, PHP environment, and logging.
  2. Test the exact command under the hosting account that will run it.
  3. Enable the replacement and verify an automatic run.
  4. Disable the page-request trigger, then verify another automatic run and the workflow result.

Following WordPress’s system scheduler guidance, add or update this setting in wp-config.php, before the stop-editing comment:

define( 'DISABLE_WP_CRON', true );

Avoid duplicate definitions. This stops default automatic spawning; scheduled events remain available for the replacement to run.

Use WP-CLI when your host supports it

The WP-CLI command reference documents --due-now for running due events. A five-minute entry in a Linux user crontab looks like this:

*/5 * * * * /usr/local/bin/wp cron event run --due-now --path=/var/www/example.com

Replace both example paths. Confirm the PHP executable and extensions available to cron; an absolute path to wp does not establish its entire environment. Keep plugins loaded so their callbacks are available.

For multisite, adding a URL targets one site:

*/5 * * * * /usr/local/bin/wp cron event run --due-now --path=/var/www/example.com --url=https://example.com

Current documentation also supports --network for running across the network. Check wp help cron event run on the host before relying on that option, and verify coverage for every relevant site.

The current reference says --due-now respects WordPress’s cron lock. Still review overlap protection for your installed version and longest jobs. Retain output and errors, and monitor skipped or failed runs. Starting extra workers without understanding the bottleneck can add load.

Use an HTTP trigger when shell access is limited

A hosting panel or external scheduler can request https://example.com/wp-cron.php. The WordPress guidance above documents using wget; a five-minute example is:

*/5 * * * * /usr/bin/wget --delete-after https://example.com/wp-cron.php

Choose one replacement method. Test from the actual scheduler: authentication, redirects, caching, or firewall rules may prevent the request reaching WordPress. A successful HTTP response does not establish that the business task finished.

Verify that the business task finished

Use the WP-CLI event list before and after an automatic run:

wp cron event list --path=/var/www/example.com --fields=hook,next_run_gmt,next_run_relative,recurrence

Recurring events should advance; completed one-off events normally disappear. Then check the actual result: the published page, updated stock, or integration log.

For controlled manual execution:

wp cron event run --due-now --path=/var/www/example.com

This executes due work immediately. Treat it as a live execution, including customer-facing actions.

After migration, wp cron test reports an error when DISABLE_WP_CRON is true. It tests HTTP spawning, so use scheduler history and workflow evidence to assess your replacement.

Plugins using Action Scheduler need their queue checked too. Its processing documentation explains how processing limits and loopback requests affect throughput. Persistent overdue actions may need a dedicated Action Scheduler WP-CLI runner; increasing trigger frequency alone may not clear them.

Leave the team with a supportable setup

Document the command, interval, account, site coverage, log location, and alert owner. Agree how much overdue work warrants attention. For rollback, restore default spawning and withdraw the replacement schedule in a coordinated change.

If scheduling currently depends on someone remembering to check it, talk to Greg about your WordPress operations. Bring the workflow causing concern. I can help define the checks, coordinate the hosting and agency work, and make the handover clear.

Quick answers

What is ALTERNATE_WP_CRON?

A wp-config.php setting for hosts where WordPress cannot make the background request to itself. With define( 'ALTERNATE_WP_CRON', true ); WordPress redirects the visitor's GET request to the same URL with ?doing_wp_cron= added and runs the due jobs during that request. It gets around a blocked loopback, but visitors see the extra parameter and it still depends on traffic. Where you can add a server cron, that is the better fix.

Why is doing_wp_cron in my access logs?

Each of those lines is a WP-Cron run: wp-cron.php?doing_wp_cron=... from the default trigger, or a page URL with the parameter when ALTERNATE_WP_CRON is on. The number is the Unix time the run started; WordPress uses it as a lock so two runs do not overlap.

wp cron event run or wget wp-cron.php?

Use wp cron event run --due-now when the host gives you a shell and WP-CLI: it runs inside WordPress without a web request. Use an HTTP request to wp-cron.php when all you have is a hosting panel scheduler. Pick one, not both.

Related on GrN.dk

Need help with this kind of work?

Talk to Greg about your WordPress operations Get in touch with Greg.

Sources

Latest articles

Know what dmesg and journalctl can tell you after a reboot, how to find previous-boot logs, and how to check that retention covers your investigation window.

Check how your chatbot identifies itself as AI, where requests for human help actually go, and what customers encounter when support is unavailable.

Start with one website change on board.nowa.dk. Write a clear task, answer questions as they arise and review the result before giving an AI agent more work.

Keep AI search visibility, training preferences and assistant access separate. Use a practical policy matrix to check Cloudflare settings and test key public pages.

Let AI draft Black Friday campaigns using approved product data. Check prices and recipients, and secure approval before sending the campaign from Mailchimp.

Make AI meeting notes useful after the call: confirm decisions, agree owners and deadlines, check existing tasks, and verify that work reaches the right tracker.

Before tuning your AI chatbot, check whether your PDFs supply readable text, reliable reading order, usable tables, and passages you can trace to the page.

Bring quote request emails from Outlook into your CRM with AI. Define fields, duplicate checks and sales ownership, then use a pilot to measure whether the solution saves time and helps more enquiries get followed up.

Plan your PHP upgrade around checkout, enquiries and daily operations, with practical checks for compatibility, staging, deployment and rollback before support ends.

Claude Sonnet 4.5 has a tentative November 30 retirement date. Find affected workflows, check compatibility and test a supported replacement before switching.