WordPress GuideAdmin → WP-Content

WordPress cron jobs: What they are, setup, management, and more

Three members of an it team manage a customer's WordPress server

If you’ve ever scheduled a post, set up automated backups, or relied on plugins to run timed tasks, you’ve used WordPress cron jobs—even if you didn’t know it. Cron jobs are a powerful tool for automating repetitive actions, but WordPress handles them a bit differently than traditional servers do. 

Understanding how WP-Cron works can help you manage performance, streamline automation, and avoid missed or delayed tasks.

Get fast, reliable hosting for WordPress

Power your site with the industry’s fastest, most optimized WordPress hosting

What is WP-Cron?

WP-Cron is WordPress’s internal scheduling system. Unlike standard server cron jobs, which rely on the server’s operating system to run tasks at exact times, WP-Cron only triggers when someone visits your site. 

That means if there’s no traffic, scheduled tasks won’t run. And if you have high traffic, it could run too often, affecting performance.

WP-Cron handles jobs like:

It’s not a true cron system—it’s event-based and traffic-triggered. That’s both a strength and a weakness depending on your site’s needs.

How it works

Every time someone loads a page on your site, WordPress checks for any scheduled tasks. If one is due, it executes it right then. These tasks are stored as scheduled events in the database and handled asynchronously.

Behind the scenes, WordPress relies on functions like wp_schedule_event(), wp_schedule_single_event(), and wp_cron() to register, trigger, and manage these jobs.

WordPress cron job uses

You’ll find WP-Cron working quietly in the background of many common WordPress tasks, including:

For custom functionality, developers often hook into WP-Cron to run their own scripts at specific intervals.

How to view and manage WP-Cron jobs

The easiest way to manage WP-Cron is with the WP Crontrol plugin. It gives you a dashboard view of all scheduled events and hooks.

How to disable WP-Cron and use a real cron job

WP-Cron can cause performance issues on very high-traffic or very low-traffic sites. Too many users can trigger jobs constantly; too few users means tasks get delayed.

To disable WP-Cron:

If using cPanel:

If using command line (Linux):

Add this to your crontab:

*/5 * * * * wget -q -O – https://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

This triggers WordPress cron without relying on site traffic.

Creating custom cron jobs in WordPress

You can create your own scheduled tasks using three main steps:

1. Register the event with wp_schedule_event()

if (!wp_next_scheduled(‘my_custom_cron_hook’)) {
    wp_schedule_event(time(), ‘hourly’, ‘my_custom_cron_hook’);
}

2. Define the callback function

function my_custom_cron_function() {
    // Your scheduled code here
}

3. Hook it into WordPress

add_action(‘my_custom_cron_hook’, ‘my_custom_cron_function’);
  
You can also add custom intervals using the cron_schedules filter if hourly, twice daily, or daily don’t fit your needs.

Troubleshooting common WP-Cron issues

Things can go wrong with cron jobs, especially if you don’t know they’re happening behind the scenes.

Best practices for WP-Cron management

Additional resources

How to use your WordPress admin login page →

How to find, use, and troubleshoot your admin page

How to limit WordPress admin access →

Do you want to allow user registration on your WordPress website or give blog writers access so they can make changes? You aren’t alone.

Easy WordPress website maintenance tips →

7 simple steps to keep on regular rotation