AIForum.

WP-Cron vs System Cron: How to Schedule AI Content Batches Reliably

On this page

THE SHORT ANSWER

WP-Cron is WordPress's pseudo-scheduler: it fires on page loads, not on a clock. System cron (or Windows Task Scheduler) calls wp-cron.php on a fixed interval. For AI content batches that must publish at predictable times, the reliable pattern is a real scheduler plus define( 'DISABLE_WP_CRON', true ); in wp-config.php.
Quick facts

If your AI content pipeline needs posts to appear at predictable times, the choice between WP-Cron and a system cron job is the difference between “usually on time” and “on time.” WP-Cron is WordPress’s pseudo-scheduler: it only fires when someone loads a page. A system cron job (or Windows Task Scheduler) runs on a real clock and calls wp-cron.php directly. For batch AI publishing, the reliable pattern is a real scheduler plus define( 'DISABLE_WP_CRON', true ); in wp-config.php.

This guide is for WordPress site owners and automation builders who are queuing AI-generated drafts and want to control when they publish. It covers what the two schedulers actually do, how to wire them up, and where each one fails.

What scheduling an AI content batch actually involves

Before choosing a scheduler, separate the two jobs people usually conflate:

  1. The runner. Something has to execute WordPress’s scheduled events — publishing scheduled posts, running plugin hooks, clearing transients. That is what WP-Cron or a system cron job does.
  2. The batch job. Your AI pipeline — generating drafts, pulling from a queue, assigning categories — is a separate task. It can be a WP-CLI command, a custom REST endpoint, or a plugin hook that the runner triggers.

PostCrane’s setup guide frames the same problem around four concepts: a queue (a ranked list of drafts with metadata such as topic, owner, and target date), a buffer (a spacing window, for example 7–15 minutes, between publishes to avoid spikes), a TTL (an expiry on AI jobs so stale jobs are skipped or regenerated), and the cron that drains the queue.

Its prerequisites are worth copying: set the site timezone under Settings → General → Timezone so it matches your editorial team, start with a cadence of 3–5 posts per week, pick 2–3 high-engagement publish slots per day (the guide’s examples are 09:30, 13:00, and 16:00), and keep at least 10 minutes between scheduled posts.

How WP-Cron works — and where it breaks

WP-Cron is not a daemon. As the WordPress developer documentation puts it, “WP-Cron does not run continuously, which can be an issue if there are critical tasks that must run on time.” Instead, WordPress checks its schedule on page loads and fires anything that is due.

That design has three practical consequences for batch publishing:

  • Low traffic means late jobs. A site with no visitors in a given hour will not run that hour’s cron events until someone arrives.
  • Traffic spikes mean bunched jobs. A burst of visitors can trigger the same overdue events repeatedly, adding load.
  • Timing is approximate. “Publish at 09:30” becomes “publish at 09:30 or whenever the next page view happens.”

For a low- or medium-traffic blog, WP-Cron is often fine. PostCrane describes it as acceptable for low/medium traffic and recommends a real cron for reliability. The moment you are batching AI content on a schedule, you are in the second category.

How system cron and Task Scheduler work

A system scheduler runs independently of web traffic. On macOS and Linux that is cron, usually edited with crontab -e. The WordPress documentation notes that jobs run as the user who owns the crontab — regular user or root — and that cron entries follow a fixed syntax: minute, hour, day of month, month, day of week, then the command to execute.

On Windows, the equivalent is Task Scheduler, reachable through Administrative Tools in the Control Panel. The WordPress docs describe creating a Basic Task and using PowerShell to make the request.

The mechanism in both cases is the same: make an HTTP request to wp-cron.php on a fixed interval. That request causes WordPress to run due events, exactly as a page load would — but on a clock you control.

WP-Cron vs system cron: the decision criteria

CriterionWP-CronSystem cron / Task Scheduler
TriggerPage loadsServer clock on a fixed interval
Timing accuracyApproximate; depends on trafficPredictable within the interval you set
Setup effortNone — built inRequires server or panel access and a scheduler entry
Extra resource useRuns on every page loadRuns only when scheduled
Best forLow/medium-traffic sites, casual schedulesTime-critical publishing, AI batch queues, e-commerce
Failure modeMissed or delayed eventsSilent failure if the cron entry or URL breaks

There is no universal winner. The tradeoff is maintenance: a system cron job is more reliable but becomes another thing that can silently stop working. WP-Cron is zero-maintenance but cannot promise a publish time.

Setting up a real scheduler for WordPress

Prerequisite: you need the ability to edit wp-config.php and to add a cron entry (or a Task Scheduler task). On managed hosting, check whether the host already runs a system cron for you before adding a duplicate.

  1. Confirm the site URL and that wp-cron.php is reachable. Open https://YOUR_SITE_URL/wp-cron.php in a browser or with a command-line HTTP client. A blank 200 response is the expected result.
  2. Create the scheduler entry. On Linux or macOS, run crontab -e and add an entry whose command makes an HTTP request to wp-cron.php. The WordPress documentation lists the syntax fields as minute, hour, day of month, month, and day of week, followed by the command. An illustrative five-minute entry looks like this:
*/5 * * * * wget -q -O - https://YOUR_SITE_URL/wp-cron.php >/dev/null 2>&1

A common interval is every 5 minutes; PostCrane recommends running WP-Cron or real cron every 5–10 minutes for AI content scheduling.

  1. On Windows, create a Basic Task in Task Scheduler and use the command from the WordPress documentation:
powershell "Invoke-WebRequest http://YOUR_SITE_URL/wp-cron.php"
  1. Disable the built-in WP-Cron. With the real scheduler in place, WordPress’s page-load checks are redundant. Add this line to wp-config.php:
define( 'DISABLE_WP_CRON', true );

The WordPress documentation is explicit about why: “WordPress will continue to run WP-Cron on each page load. This is no longer necessary and will contribute to extra resource usage on your server.”

Observable check: after disabling WP-Cron, schedule a test post for a few minutes in the future. If it publishes close to the scheduled time with no traffic to the site, the real scheduler is working. If it does not publish at all, the cron entry is not reaching wp-cron.php — check the URL, the user’s permissions, and whether the host blocks loopback HTTP requests.

Scheduling the AI batch itself

Once the runner is reliable, decide how your batch job is invoked. Two common patterns:

  • Inside WordPress: register a custom cron event with wp_schedule_event() and let the runner fire it. Your callback pulls the next item from the queue, generates or assembles the draft, applies the TTL check, and schedules the post.
  • Outside WordPress: a separate cron entry or scheduled command runs a WP-CLI command or calls a custom REST endpoint. This keeps heavy generation work out of the web request that triggered wp-cron.php.

Either way, keep the queue visible. PostCrane’s guidance is to tag readiness and priority with categories or custom fields so everyone knows what is next and when. Buffers matter here too: at least 10 minutes between scheduled posts prevents a batch from publishing in a clump and spiking your server.

Troubleshooting: “missed schedule” and silent failures

WordPress shows a “Missed schedule” status when a post’s scheduled time passed without the event firing. PostCrane’s advice is to monitor for missed schedules and re-queue quickly rather than let a backlog build.

Work through these checks in order:

  1. Is the runner actually running? If you disabled WP-Cron, verify the system cron entry exists and its command succeeds when run manually.
  2. Is the URL correct? A changed domain, a redirect to HTTPS, or a staging password can all break the request.
  3. Is the server clock correct? Cron evaluates against system time; a skewed clock shifts every job.
  4. Is the queue stale? If jobs have exceeded their TTL, they may be skipped by design. Check whether the TTL is too aggressive for your generation time.
  5. Is the batch job too slow? Long AI generation inside a cron-triggered request can hit PHP time limits. Move it to WP-CLI or a background queue.

Practical recommendation

Use WP-Cron if your AI content cadence is casual, your traffic is steady, and a publish time that drifts by minutes or hours is acceptable. Move to a system cron job if you are batching content, publishing to a fixed editorial calendar, or running anything time-sensitive. In that case, set the interval to 5–10 minutes, disable WP-Cron in wp-config.php, and add monitoring for the cron entry itself — because a real scheduler fails quietly.

If you are setting this up now, share your environment — host, scheduler, interval, and whether you generate inside WordPress or via WP-CLI — in the community so others can compare notes.

FAQ

Does disabling WP-Cron break scheduled post publishing?

It does if nothing else runs WordPress's scheduled events. When you add define( 'DISABLE_WP_CRON', true ); you must have a system cron job or Task Scheduler task calling wp-cron.php on a regular interval, otherwise scheduled posts will not fire.

How often should the system cron job run?

PostCrane recommends running WP-Cron or real cron every 5–10 minutes for AI content scheduling. The WordPress documentation describes setting the system task scheduler to run on whatever interval you need.

Can I run WP-Cron and system cron at the same time?

You can, but the WordPress documentation advises disabling WP-Cron once a real scheduler is in place, because continuing to run it on each page load contributes to extra resource usage on your server.

Where does the DISABLE_WP_CRON line go?

It goes in the wp-config.php file for your WordPress installation, added as a define() statement alongside the other configuration constants.

References

  1. https://developer.wordpress.org/plugins/cron/hooking-wp-cron-into-the-system-task-scheduler/
  2. https://postcrane.com/wordpress-ai-content-scheduler-setup/

Related terms

WP-Cron
WordPress's built-in pseudo-scheduler. It does not run continuously; it checks for due events when pages load.
System cron
The operating system's time-based scheduler on macOS and Linux, edited with crontab -e, which runs commands on a clock.
Task Scheduler
The Windows equivalent of cron, accessible via Administrative Tools in the Control Panel.
TTL (time-to-live)
An expiry applied to queued AI jobs so stale jobs are skipped or regenerated instead of publishing outdated content.
Missed schedule
A WordPress post status shown when a post's scheduled time passed without the cron event firing.

Leave a Reply

Your email address will not be published. Required fields are marked *