Skip to main content
GrN.dk

Main navigation

  • Articles
  • Cases
  • Contact
  • Your Digital Project Manager
  • About Greg Nowak
  • Services
  • Portfolio
  • Container
    • Excel Freelancer
    • Kubuntu - tips and tricks
    • Linux Apache MySQL and PHP
    • News
    • Image Gallery
User account menu
  • Log in

Breadcrumb

  1. Home

WordPress Cron: When It’s Time to Replace WP-Cron with Server Cron

By Greg Nowak. Last updated 2026-07-10.

WP-Cron is fine until a site starts depending on timing. A scheduled article appears late, an import waits for the next visitor, or a renewal task drifts into a support ticket. At that point the problem is not that WordPress has a scheduler. It is that the scheduler is being woken by web traffic while the business expects clock-based reliability.

For most established WordPress sites, the sensible change is smaller than it sounds: keep WordPress’s event queue, but replace the traffic-dependent trigger with the server’s scheduler. That makes scheduled work more predictable without forcing plugins or editors to adopt a new system.

What changes when you move to server cron

WordPress core and plugins register events in WP-Cron. On normal site requests, WordPress checks for due events and attempts to spawn wp-cron.php. If the site has no traffic, a due event can sit until the next request. A busy site creates more opportunities to trigger the queue, but it can still have trouble if loopback HTTP requests are blocked or unreliable.

A server cron job supplies the dependable wake-up call. WordPress still decides which hooks are due and runs them. This distinction matters: server cron improves the trigger, but it does not repair a slow import, a broken plugin callback, or a task that was never scheduled correctly.

Do you actually need to replace the default trigger?

Site situation Practical choice Reason
Brochure site; timing has little business impact Keep WP-Cron Best-effort execution is usually sufficient
Scheduled publishing or campaigns must launch on time Use server cron Traffic should not control delivery
Orders, memberships, feeds, imports, or integrations depend on background work Use server cron Delay creates operational or customer-facing risk
Agency team supports several business-critical sites Use server cron with logging A repeatable trigger is easier to test and hand over
No shell access, but the host offers scheduled URL calls Use an HTTP trigger It provides a clock-based trigger without WP-CLI
A decision guide for choosing between default WP-Cron and a server-managed trigger.

The decision is about the cost of delay, not site size. A low-traffic membership site may need dependable scheduling more than a busy publication where a five-minute delay changes nothing.

A safe migration sequence

  1. Inventory the important jobs. Record the hooks or business workflows that matter, their expected frequency, and who notices when they fail.
  2. Choose an interval. Five minutes is a sound starting point for many business sites. Use one minute only where the workflow justifies it; use 15 minutes where timing is relaxed.
  3. Create the server job. Prefer WP-CLI when you control the server. Use an HTTP call when that is what the hosting platform supports.
  4. Run the exact command manually. Test it as the same operating-system user, with the same paths and permissions the scheduler will use.
  5. Then disable page-load spawning. Add the following setting to wp-config.php only after the replacement trigger works.
define( 'DISABLE_WP_CRON', true );

Reversing that order creates an avoidable outage: events remain scheduled, but nothing wakes the queue.

Choose the trigger that fits the hosting setup

WP-CLI: the cleaner option on a managed server

WP-CLI avoids the public web path and gives the technical team a command it can run directly. Use absolute paths because cron often has a smaller environment and a different PATH from an interactive shell.

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

Change both paths for the real server. On multisite, add --url=https://example.com to select the intended site. During commissioning, keep command output available; once the job is stable, route output and errors into the logging or alerting system your host actually monitors.

HTTP: useful when the platform schedules URL calls

An HTTP trigger is simpler on hosting without a dependable WP-CLI setup. The WordPress handbook uses wget to request wp-cron.php:

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

Confirm the request works from the server itself. Basic authentication, firewall rules, redirects, CDN policies, or a security plugin can block a request that looks fine in a browser. The --quiet flag suppresses output, so remove it while testing or make sure the scheduler records failures elsewhere.

Test the replacement path, not the old one

Before the switch, wp cron test is useful for diagnosing WordPress’s built-in HTTP spawning system. After DISABLE_WP_CRON is set to true, that command is expected to report an error because the spawning system is deliberately disabled. It is not a valid health check for the new server job.

Use WP-CLI to inspect the queue and run due events directly:

wp cron event list --fields=hook,next_run_gmt,next_run_relative,recurrence
wp cron event run --due-now

Then run the full scheduled command as the cron user. Check that it exits successfully, due events execute, and their next-run times advance. Finally, test one real low-risk workflow, such as a scheduled draft or a non-customer-facing import. A healthy queue is useful evidence; a completed business workflow is better evidence.

Make it supportable after launch

  • Document the scheduler, system user, command, interval, WordPress path, and site URL.
  • Assign an owner for failures and decide where errors should be visible.
  • Avoid leaving both page-load and server triggers active after commissioning.
  • Review long-running or repeatedly failing hooks separately; a faster trigger will not fix their code.
  • Keep a rollback note: restore the normal WP-Cron setting if the external scheduler becomes unavailable.

Replacing the WP-Cron trigger is a small infrastructure change, but it crosses WordPress, hosting, permissions, and business process. If those boundaries are creating recurring support work, Greg can audit the queue, implement the right trigger, and leave your team with a setup it can understand and operate. Talk to Greg about your WordPress operations.

Related on GrN.dk

  • WordPress Security Releases Still Need an Ops Runbook for Business Sites
  • AI Crawler Control for Business Websites: Protect Content Without Sacrificing Search Visibility
  • Critical CSS for Faster Pages: When It Helps and When It Does Not

Need help with this kind of work?

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

Sources

  • Cron – WordPress Plugin Handbook
  • Hooking WP-Cron Into the System Task Scheduler
  • wp cron event run – WP-CLI Command
  • wp cron event list – WP-CLI Command
  • wp cron test – WP-CLI Command
Last modified
2026-07-10

Tags

  • wordpress
  • WP-CLI
  • Linux
  • Operations

Review Greg on Google

Greg Nowak Google Reviews

 

Illustrated infographic summarizing: Not Every AI Job Needs an Instant Answer: Batch the Backlog
Not Every AI Job Needs an Instant Answer: Batch the Backlog
2026-07-28

Move delay-tolerant AI work into dependable batch queues to cut processing costs without compromising quality, data controls, or urgent workflows.

Illustrated infographic summarizing: A stray Set-Cookie can waste your CDN: audit the cache at the edge
A stray Set-Cookie can waste your CDN: audit the cache at the edge
2026-07-27

Cloudflare Cache Response Rules can recover wasted CDN capacity, but first you need a route-level audit of public, personal and authenticated responses.

Illustrated infographic summarizing: Shorter TLS certificates expose every renewal you never automated
Shorter TLS certificates expose every renewal you never automated
2026-07-26

Shorter TLS lifetimes leave less room for manual handoffs and faulty deploy hooks. Build a renewal path that protects service availability.

Illustrated infographic summarizing: One Timeout, Two Orders: Make AI Actions Safe to Retry
One Timeout, Two Orders: Make AI Actions Safe to Retry
2026-07-25

A timed-out AI action may already have succeeded. Stable keys, durable ledgers, queues and stored results prevent a routine retry from duplicating real work.

Illustrated infographic summarizing: Your AI Visibility Dashboard Needs a Methodology, Not More Charts
Your AI Visibility Dashboard Needs a Methodology, Not More Charts
2026-07-24

A practical framework for measuring AI-search visibility with fixed prompts, repeated tests, separate metrics, retained evidence, and honest reporting.

Illustrated infographic summarizing: AI Admin APIs Are Here—But Your Directory Is Still the Source of Truth
AI Admin APIs Are Here—But Your Directory Is Still the Source of Truth
2026-07-23

New AI admin APIs can automate access and spend controls, but reliable governance still starts with authoritative directory data and clear ownership.

Illustrated infographic summarizing: OpenAI Presence Arrived—But Is Your Workflow Ready for an Agent?
OpenAI Presence Arrived—But Is Your Workflow Ready for an Agent?
2026-07-22

Before an AI agent can take on real work, its workflow needs clear scope, permissions, handoffs, evaluation cases, and production monitoring.

Illustrated infographic summarizing: Chatbot Transcripts Quietly Became a Retention and Redaction Problem
Chatbot Transcripts Quietly Became a Retention and Redaction Problem
2026-07-21

Chatbot transcripts spread across providers, logs and support tools. Here is how to map each copy, redact sensitive data and test deletion properly.

Illustrated infographic summarizing: Cloudflare Service Keys Stop in September: Find Every Caller
Cloudflare Service Keys Stop in September: Find Every Caller
2026-07-20

Cloudflare Service Keys stop working on September 30, 2026. Here is how to find every caller, move to scoped API tokens and avoid a late outage.

Illustrated infographic summarizing: Your AI Workflow Needs an Acceptance Test Before It Meets Customers
Your AI Workflow Needs an Acceptance Test Before It Meets Customers
2026-07-19

A practical way to test AI workflows using realistic scenarios, tool checks, human rubrics, regression suites, and clear release gates.

More articles
RSS feed

GrN.dk web platforms, web optimization, data analysis, data handling and logistics.