Discover the power of WP-Cron for your WordPress site. Our tutorial explores advanced settings and custom functions, guiding you step by step through setting up WP-Cron as a real server-level cron job. Manage your site’s tasks efficiently — from scheduled posts to database updates. With easy-to-follow instructions, you’ll gain full control over your website’s backend processes, ensuring everything runs reliably and on schedule.
Cron jobs are scheduled tasks that run automatically at a specified time or interval. They are commonly used to automate repetitive or time-consuming processes, such as checking for updates or sending notifications.
In the context of WordPress, cron jobs play a key role in improving your site’s performance, reliability, and automation. For example, you can use a cron job to:
- Schedule regular backups
- Automatically publish posts
- Delete expired transients
- Clean up old post revisions
- Run synchronizations or API calls
When properly configured, cron jobs help ensure that critical tasks are executed consistently — without requiring manual intervention.
Overall, cron jobs are a powerful tool for managing and maintaining a WordPress site, saving you time and effort while keeping your website running smoothly in the long run.
What is a Cron Job?
A cron job is a task that is set up to run automatically and as per a specified schedule, either at a certain time or at regular intervals. This is a great way to ensure that certain processes are consistently run and that you don’t have to manually trigger them each time. It’s often used in server automation, and can be a massive time saver.
What is WP-Cron?
WP-Cron is the built-in scheduling system used by WordPress to manage and execute scheduled tasks at regular intervals. It is designed to increase the flexibility and efficiency of the WordPress system by allowing users to schedule tasks to run at pre-determined times, ensuring that those tasks execute when needed.
This system enables WordPress to adapt to the ever-changing needs of its users while providing a convenient way to automate recurring processes. While the name (and core idea) originates from UNIX cron, WordPress cron does not function as a true system-level cron daemon. Instead, it relies on time intervals and internal triggers for task scheduling.
By default, WordPress provides the following time intervals:
- Hourly
- Twice daily
- Daily
- Weekly
However, these time-based tasks depend on visitors accessing your site. In other words, WP-Cron only runs when someone loads a page on your website.
Because of this design, execution timing may not always be precise or reliable. This is one of the main reasons why many production websites choose to configure a real server-level cron job instead of relying solely on the default WP-Cron system.
When should you use a real server-level cron?
WP-Cron is not a true system-level scheduler. It only runs when someone visits your website.
Because of this design, scheduled tasks may not always run exactly when expected.
This can happen:
- On low-traffic websites, where no visits occur at the scheduled time.
- On high-traffic websites, where multiple cron processes may overlap.
- When aggressive caching is enabled and PHP does not execute on every request.
- When running critical tasks such as synchronizations, API calls, or scheduled automations.
While caching systems can increase the likelihood of missed cron executions, they are not the root cause. WP-Cron depends on site traffic by design.
👉 For production environments, we strongly recommend configuring a real server-level cron job, even if no cache plugin is installed.
This ensures that scheduled tasks run at fixed intervals and do not depend on website visits.
What are the benefits of using WP-Cron?
WP-Cron is a useful WordPress feature that allows users to schedule tasks to run at predetermined times. This functionality is incredibly helpful for streamlining processes such as automatically publishing posts, checking for plugin or theme updates, and sending email notifications.
By automating these recurring tasks, WP-Cron helps keep your website up to date and running smoothly, while ensuring that content is published at the right time. It plays an important role in maintaining your site’s automation, consistency, and operational efficiency.
Overall, WP-Cron is an effective way to automate a wide range of WordPress tasks, resulting in a more efficient, reliable, and well-managed website.

Streamline your workflow with Airtable and WordPress
Easily manage your WordPress site from Airtable: publish and update blog content and pages, manage users, job offers, SEO and much more. Simple and effortless integration with no coding required.
How to Setup WP-Cron as a real Cron Task?
Setting up WP-Cron requires adding a line of code to the wp-config.php file in the root directory of your WordPress installation. This code essentially signals to WordPress that it needs to run WP-Cron at regular intervals.
When setting up WP-Cron as a cron job in WordPress, it’s important to understand how it works and what its implications are.
To set up a cron job in WordPress using WP-Cron, first you’ll need to open up your wp-config.php file and add the following line:
define('DISABLE_WP_CRON', true);
This will disable the built-in WP-Cron and allow you to set up a cron job manually.
⚠️ Make sure you configure the server-level cron job immediately after disabling WP-Cron. Otherwise, scheduled tasks will stop running.
How to Set Up a Server-Level Cron Job (SSH & WP-CLI Methods)
There are two common ways to configure a real server-level cron job for WordPress:
- Using SSH and system crontab
- Using WP-CLI
Both methods ensure that WP-Cron runs independently of website traffic.
Method 1: Using SSH (System Crontab)
If you have SSH access to your server, you can configure the cron job directly through the system scheduler.
- Connect to your server via SSH.
- Open your crontab file:
crontab -e
- Add the following line:
* * * * * wget -q -O – https://www.example.com/wp-cron.php >/dev/null 2>&1
This will execute the wp-cron.php file every minute and trigger any scheduled WordPress tasks.
⚠️ Make sure to replace https://www.example.com with your actual domain.
Alternative (More Reliable) SSH Method Using PHP Directly
Instead of calling the URL with wget, you can run the PHP file directly:
* * * * * php /path/to/your/wordpress/wp-cron.php >/dev/null 2>&1
This method is often more reliable and faster, since it avoids HTTP requests and runs directly on the server.
Method 2: Using WP-CLI (Recommended for Developers)
If your hosting environment supports WP-CLI, you can trigger cron events directly from the command line.
Add this to your crontab:
* * * * * wp cron event run –due-now –path=/path/to/your/wordpress >/dev/null 2>&1
This command:
- Runs all due cron events immediately
- Bypasses the default traffic-based WP-Cron trigger
- Executes tasks directly through WordPress core
💡 This method is generally cleaner and more efficient, especially on high-traffic or production environments.
For more information on WP-Cron follow this link: https://developer.wordpress.org/cli/commands/cron/
By following these steps, you can easily configure a real server-level cron job in WordPress, ensuring that WP-Cron runs independently of website traffic. This approach improves the reliability of your scheduled tasks and guarantees that they execute at consistent, fixed intervals.
Setting up a proper cron configuration is a key step toward building a stable, automated, and high-performance WordPress website.
Master the art of website management with WP-Cron and server-level cron jobs. Our comprehensive guide provides everything you need to automate and control your site’s schedules, enhance productivity, and keep your content consistently up to date.
To get even more out of WP-Cron, explore the following resources for additional insights, best practices, and advanced configuration techniques to take your WordPress experience to the next level: