WP-Cron is WordPress's built-in task scheduler, and it does not run on a clock. Every time a page on your site is loaded, WordPress quietly checks a list of scheduled tasks and runs whatever is due at that moment. That single design choice explains almost every "my scheduled post published late" or "my backup never ran" complaint.
In this guide you will see what actually happens on a page load, how to list and manage what is scheduled, when to disable WP-Cron and replace it with a real system cron job, and how to debug a task that keeps failing. No PHP expertise required beyond one short snippet.
The path in 6 steps
The steps of this page, in order.
-
01 See the trigger Understand that tasks run on page loads, not on a clock.
-
02 Find what's scheduled List the events waiting in your cron queue.
-
03 Check your traffic Decide whether site visits are frequent enough to be reliable.
-
04 Switch to real cron Disable WP-Cron and point a system scheduler at wp-cron.php.
-
05 Verify it works Confirm tasks now run on time and nothing runs twice.
-
06 Debug failures Fix missed runs, duplicates, and timezone mistakes.
01 / 09
What is WP-Cron, in plain English?
WP-Cron is WordPress's own scheduler, and unlike a server's cron it has no clock of its own: it waits for a page to be loaded and then runs whatever is overdue.
WP-Cron is WordPress's built-in task scheduler. Instead of checking the clock on a fixed timer, it waits until someone loads a page on your site, then looks for any tasks that are due. If no one visits for hours, those tasks wait too.
System cron (the Unix/Linux scheduler) works differently: it runs commands at exact times, whether or not a visitor is on the site. WordPress uses WP-Cron as a fallback because many shared hosts don't give site owners easy access to the server's scheduler.
WP-Cron
WordPress's own scheduler. It triggers on page loads, so a task runs only after a visitor, bot, or you load a page. Good for low-traffic sites, unreliable when traffic dies down.
- Trigger
- Page load (any request to your site)
- Default intervals
- Hourly, twice daily, daily
- Best for
- Sites without server scheduler access
Key pointCheck your site's traffic pattern: if you get steady visitors, WP-Cron may be fine; if it's quiet overnight, schedules will drift.
System cron (Unix/Linux)
The server's operating system scheduler. It runs commands on a precise timetable, independent of site traffic. Requires access to the server's crontab or a control panel tool.
- Trigger
- Clock time (e.g., every 5 minutes)
- Runs without visitors?
- Yes
- Best for
- Sites that need reliable timing
Key pointIf your host offers server cron, use it to trigger WP-Cron's queue instead of relying on page loads.
Going further
Open the database view
Concept
Where scheduled events are actually stored
All pending WP-Cron tasks are stored in a single row in your site's options table (usually under the option name 'cron'), so if that table is damaged or the row is corrupted, scheduling breaks too.
WordPress keeps its to-do list in the database, not in a file on the server. The list lives in the options table (the same table that holds site settings) under a row typically called 'cron'. Every time WP-Cron checks for due tasks, it reads that row, runs whatever is overdue, and writes the updated list back.
That means any problem that stops WordPress from reading or writing the options table will also stop scheduled tasks. A failed database upgrade, a plugin that corrupts serialized data, or a caching layer that serves stale options can all cause tasks to vanish or run repeatedly.
If you suspect this, you can inspect the cron entry with a database tool like phpMyAdmin or WP-CLI. Look for a row with option_name 'cron' and check that its value is valid serialized data. A quick way to reset it is to delete the row and let WordPress rebuild it on the next page load, but back up your database first.
- Check the options tableIn phpMyAdmin, browse the wp_options table and search for option_name 'cron'. If the row is missing or its value looks broken, scheduling cannot work.
- Use WP-CLI to list eventsRun 'wp cron event list' in your site's directory. It shows every scheduled task, its next run time, and its recurrence. No output means the cron row is empty or unreadable.
- Look for database errorsEnable WordPress debug logging and check for 'WordPress database error' messages around the times tasks should have run. Repeated errors point to a corrupt or locked table.
- Test with a default taskSchedule a simple post to publish a few minutes ahead. If it misses, the problem is systemic, not specific to one plugin's task.
02 / 09
Why do my scheduled tasks run late?
Because WP-Cron checks the queue on page loads, a task due at 2:00 PM may not run until 5:00 PM if nobody visits your site in between.
Every time a visitor loads a page, WordPress opens wp-cron.php, the file that reads the list of pending tasks from your database and runs the ones whose timestamp has passed. A scheduled event is one task in that queue, stored in the options table with a timestamp for when it should run. If no one visits, nothing runs.
So a task due at 2:00 PM can wait until 5:00 PM, or until the next morning on a quiet site. The upside: a missed task is not lost. It stays in the queue and fires at the next opportunity, unlike a system cron job that is simply skipped if its moment passes.
-
A visitor requests a page
Any front-end or admin page load triggers the check, not just scheduled posts.
-
WordPress opens wp-cron.php
The file connects to the database and reads the list of scheduled events stored in the options table.
-
It compares timestamps
Each event has a timestamp for when it should run. WordPress checks which ones are already due.
-
Due tasks execute
Tasks whose time has passed run in that request. Tasks not yet due are left alone.
-
Missed tasks wait
If no page load happens, nothing runs. The event stays queued and fires on the next visit.
Going further
What about DDoS risk?
Special case
The security side of wp-cron.php
wp-cron.php runs on page loads, so anyone can trigger it repeatedly and force your database to do work it did not need to do.
Because wp-cron.php is a public file, an attacker can request it over and over from many machines. Each request makes WordPress open the database, read the queue, and check for due tasks, even when the queue is empty. On a small shared hosting plan this can burn CPU and database connections, and it may slow the site for real visitors.
The fix is to stop the page-load trigger and run the queue from a real system cron job instead. In wp-config.php, add define('DISABLE_WP_CRON', true); then set up a server cron task to call wp-cron.php on a fixed schedule, such as every five minutes. That way the file runs only when your server says so, not when a stranger asks for it.
Check your host's documentation first: some managed hosts already disable the page-load trigger or provide their own cron panel, and adding a second system cron job can double-run tasks. If you are not sure, ask support before changing wp-config.php.
- Confirm the page-load triggerOpen wp-cron.php directly in a browser; if it returns a blank page, the trigger is active.
- Check for DISABLE_WP_CRONLook in wp-config.php for define('DISABLE_WP_CRON', true); it may already be set by your host.
- Add one system cron jobSchedule a single request to wp-cron.php every five minutes, not more, to avoid overlapping runs.
- Watch the queueAfter the change, verify tasks still run on time and no duplicate events appear in your scheduled tasks list.
03 / 09
How do I see what is actually scheduled?
Two tools cover almost every case: the WP Crontrol plugin for a visual list, and WP-CLI for a command-line list when you have shell access.
WP Crontrol adds a screen under Tools where you can see every event, its next run time, its schedule, and the hook it is attached to. A hook is a named point in WordPress where your code attaches a function so it runs at a specific moment. You can also run an event immediately or delete it.
With WP-CLI, a command-line tool for managing WordPress without a browser, one command lists all events and another runs a specific hook on demand. That is faster when you are debugging on a server. Whichever tool you use, note the difference between the schedule name (hourly, daily) and the exact timestamp of the next run.
Plugin screen vs. command line
| Route | Access needed | What you can do | Best use case |
|---|---|---|---|
| WP Crontrol | WP admin login | List events, check next run, run or delete an event | Everyday checks and quick fixes without shell access |
| WP-CLI | Shell or SSH access | List all events, run a specific hook on demand | Debugging on a server, scripting, bulk checks |
Both routes show the event list; the differences are where you stand and what you can change from there.
04 / 09
Which cron setup fits my site?
The right choice depends on two things only: how much traffic your site gets, and how much control your host gives you over the server.
Low-traffic sites are the worst case for WP-Cron, because long gaps between visits are exactly what delays tasks. If your host manages cron at the platform level, the page-load trigger already happens outside your site and you may not need to change anything.
The comparison below is the decision shortcut: match your situation to a row, and take the recommendation.
WP-Cron (the default)
- Works out of the box on any host
- No server access or extra setup needed
- Fine for busy sites with constant traffic
- Only runs when someone visits a page
- Long gaps between visits delay or skip tasks
- Hard to predict timing on low-traffic sites
- Can be triggered by bots hitting wp-cron.php
Keep it if your site gets steady traffic and your tasks are not time-critical.
A real system cron job
- Runs on a fixed schedule set by the server, not by visitors
- Predictable timing even with zero traffic
- You control exactly what runs and when
- Requires server or hosting-panel access to schedule
- You disable WP-Cron and manage it yourself
- A broken command means tasks stop silently
Best for low-traffic sites or anyone who needs scheduled posts, backups, and updates to fire on time.
A host-managed or external cron service
- No server access needed, configured in a dashboard
- The host or service handles timing for you
- Useful when your host blocks custom cron jobs
- Depends on your plan or adds a recurring cost
- Limited control over how the trigger works
- Support and behavior vary by provider
A good fit on managed hosting that already offers it, or when you cannot edit server cron yourself.
05 / 09
How do I replace WP-Cron with a real cron job?
Disable the page-load trigger, then point a real system cron job at wp-cron.php so it runs on a fixed schedule whether or not anyone visits.
First, add define('DISABLE_WP_CRON', true); to wp-config.php. That stops WordPress from firing its queue on visitor page loads, but the event list stays intact. Then create a real cron entry on the server that calls wp-cron.php every five or fifteen minutes. Traffic no longer decides when your tasks run.
Keep the schedule in one place so you can see it. A custom event is registered on a hook once, then unscheduled when you no longer need it, no orphaned jobs left running.
-
Set DISABLE_WP_CRON to true
Add define('DISABLE_WP_CRON', true); to wp-config.php above the 'That's all, stop editing' line. Check: save the file and reload any page, the scheduled list should still show your events, but none should fire from the page load itself.
-
Create the system cron job
In your host's cron panel or via crontab -e, add a command that requests wp-cron.php. A typical entry uses wget or curl to hit https://example.com/wp-cron.php. Check: run the command manually once and confirm it returns without a 404.
-
Match the interval to the job
Set the cron entry to every five or fifteen minutes, not every minute unless a task truly needs it. Check: wait one interval and confirm the next scheduled timestamp for a known event moves forward on its own.
-
Verify traffic no longer matters
Visit the site in a private window, then check the scheduled list again. Check: the event times should advance on the clock, not on how many visitors you sent.
Going further
Show the code
Method
A minimal snippet for your own scheduled task
A custom event is hooked once, then cleared when it's no longer needed, so the queue stays honest.
Register your event on a hook you control. If you use a plugin or theme, place the registration in the activation path so it runs once, not on every page load.
When the feature is removed or updated, unschedule the hook. Otherwise the event fires into nothing and clutters the list. The snippet below is the whole pattern, register, then clear.
- Register onceCall wp_schedule_event() inside an activation hook so it doesn't duplicate on each request.
- Use a named hookYour callback runs on that hook only, so you can see and clear it by name.
- Clear on deactivationCall wp_clear_scheduled_hook() with the same name when the feature is turned off.
- Confirm in the listAfter either change, open the scheduled events list and check the hook appears or disappears exactly once.
06 / 09
What does this cost, and is it worth it?
For most sites the cash cost is zero; the real cost is one small config change plus a few minutes of verification, against the risk of backups and posts that never fire.
Setting up a real cron job is free, since your hosting plan already includes the server's scheduler. Paid options, like external cron services or scheduling plugins, vary in price; treat any figure as a rough estimate and check the vendor's current pricing page.
The hidden cost is doing nothing: a missed backup, a post published hours late, or a failed renewal email. That risk grows with traffic and the number of scheduled tasks.
Worked example
Setup time vs. exposure to missed tasks
- Configuration change
- 1 hour
- Verification over one month
- 30 minutes
- Assumed value of one missed critical task
- $200
-
Total setup time1.5 hours
1 + 0.5
Includes disabling WP-Cron and adding a system cron job.
-
Break-even point0.0075
1.5 ÷ 200
You recover the time cost if you prevent one missed task worth $200.
-
Annual savings if one task is missed per month$2,400
200 × 12
Hypothetical value; adjust to your own business.
07 / 09
What can go wrong, and how do I fix it?
Almost every cron problem falls into three buckets: tasks that never run, tasks that run twice, and tasks that run at the wrong hour because of a timezone mismatch.
Match the symptom to the cause before editing anything. A task that never runs usually points to no traffic hitting the site, a system cron job that stopped executing, or a queue that was never cleared. A task that runs twice almost always means WP-Cron and a server cron are both active and firing the same event. Times off by whole hours point to a mismatch between the site's timezone setting and the server clock.
One warning applies to every site: wp-cron.php can be requested directly from the web, so a flood of requests can overload a server. The trade-off is the opposite risk, checking the queue on every page load costs performance on busy sites.
Missed schedules
Check the last run time first. Low-traffic sites may never trigger WP-Cron; a system cron job may have stopped.
Duplicate runs
Confirm only one trigger is active. If a server cron and WP-Cron both fire, the same task runs from two directions.
Timezone shifts
Compare the site timezone with the server clock. A mismatch moves every scheduled time by hours.
Wp-cron.php exposure
Block or throttle direct requests to that file, and weigh the cost of running the queue on every page load.
08 / 09
So what should I do first?
Check your traffic pattern first: if your site gets steady visits, WP-Cron is probably fine, and if it does not, switch to a real cron job today.
Start with your traffic pattern, not with a plugin or a service. If your site gets steady visits through the day, WP-Cron is probably firing on time and there is little to fix. If you see long overnight gaps, or fewer than a few visits an hour, move to a real cron job or your host's cron service today.
Leave a busy site alone and check the queue now and then. Bring in a developer only for custom scheduled tasks with error handling, or when your host will not give you shell access.
Low traffic
Your site gets fewer than a few visits an hour, or goes quiet overnight. WP-Cron waits for a page load that never comes, so tasks drift.
- Traffic
- Under a few visits per hour
- Best fit
- System cron or host cron service
Key pointSwitch to a real cron job today.
High traffic
Visitors keep arriving all day, so each page load triggers WP-Cron and tasks fire on schedule. The setup is already working.
- Traffic
- Steady visits through the day
- Best fit
- Keep WP-Cron as is
Key pointMonitor the queue occasionally and leave it alone.
Managed host
Your host offers a built-in cron service or a control panel scheduler. This is often the easiest option when you cannot reach shell or edit crontab.
- Access needed
- Host control panel
- Best fit
- Host-managed cron or external service
Key pointAsk your host for their cron docs and enable it.
09 / 09










