[Skip to content](#main)

[→](/)

[![Avunu](/brand/avunu-logo.svg)![Avunu](/brand/avunu-logo-light.svg)](/)[Services](/services/)[Consulting](/services/consulting/)[ERP](/services/erp/)[Odoo](/services/erp/odoo/)[ERPNext](/services/erp/erpnext/)[Custom software](/services/custom-software/)[Devices & IoT](/services/devices-iot/)[Websites](/services/websites/)[Infrastructure](/services/infrastructure/)[Partners](/partners/)

[Work](/work/)[Open source](/open-source/)[Knowledge base](/kb/)[About](/about/)

[About Avunu](/about/)[Team](/about/team/)[Insights](/insights/)[Contact](/contact/)

[Client portal](https://erp.avunu.net/projects)[Start a project](/start/)

- [Services](/services/)[Consulting](/services/consulting/)
- [ERP](/services/erp/)
- [Odoo](/services/erp/odoo/)
- [ERPNext](/services/erp/erpnext/)
- [Custom software](/services/custom-software/)
- [Devices & IoT](/services/devices-iot/)
- [Websites](/services/websites/)
- [Infrastructure](/services/infrastructure/)
- [Partners](/partners/)

[Work](/work/)[Open source](/open-source/)[Knowledge base](/kb/)[About](/about/)

- [About Avunu](/about/)
- [Team](/about/team/)
- [Insights](/insights/)
- [Contact](/contact/)

[Client portal](https://erp.avunu.net/projects)[Start a project](/start/)

[Knowledge base](/kb/)[WordPress](/kb/wordpress/)Run WordPress cron from the system scheduler

Search the knowledge basePress/

ESC

Jump to

[Browse the knowledge base](/kb/)[Frappe](/kb/frappe/)[ERPNext](/kb/erpnext/)[Odoo](/kb/odoo/)[WordPress](/kb/wordpress/)[NixOS](/kb/nixos/)[Email](/kb/email/)[Linux](/kb/linux/)[Databases](/kb/databases/)[Containers](/kb/containers/)[Proxmox](/kb/proxmox/)[Git & Dev Tools](/kb/git-and-dev-tools/)

↵select↑↓navigateescclose

Search the knowledge base

[Skip to the article](#kb-article)[WordPress](/kb/wordpress/)10 articles

- [Overview](/kb/wordpress/)
- [Admin-only custom post types with custom list columns](/kb/wordpress/custom-post-type-admin/)
- [Docket Cache baseline configuration](/kb/wordpress/docket-cache-configuration/)
- [Gravity Forms](/kb/wordpress/gravity-forms/)
- [Populate Gravity Forms image choices from an ACF image field](/kb/wordpress/gravity-forms-image-choices-acf/)
- [Register custom block styles in a classic theme](/kb/wordpress/block-styles-classic-themes/)
- [Run WordPress cron from the system scheduler](/kb/wordpress/wordpress-cron/)
- [Split a child theme's functions.php into included files](/kb/wordpress/child-theme-file-includes/)
- [WordPress database optimization queries](/kb/wordpress/database-optimization-queries/)
- [WordPress debugging snippets](/kb/wordpress/debugging-snippets/)
- [WP-CLI cookbook](/kb/wordpress/wp-cli-cookbook/)
- [wp-config.php reference](/kb/wordpress/wp-config-reference/)

Other sections[Frappe](/kb/frappe/)[ERPNext](/kb/erpnext/)[Odoo](/kb/odoo/)[NixOS](/kb/nixos/)[Email](/kb/email/)[Linux](/kb/linux/)[Databases](/kb/databases/)[Containers](/kb/containers/)[Proxmox](/kb/proxmox/)[Git & Dev Tools](/kb/git-and-dev-tools/)

In WordPress: 10 articles

[Overview](/kb/wordpress/)[Admin-only custom post types with custom list columns](/kb/wordpress/custom-post-type-admin/)[Docket Cache baseline configuration](/kb/wordpress/docket-cache-configuration/)[Gravity Forms](/kb/wordpress/gravity-forms/)[Populate Gravity Forms image choices from an ACF image field](/kb/wordpress/gravity-forms-image-choices-acf/)[Register custom block styles in a classic theme](/kb/wordpress/block-styles-classic-themes/)[Run WordPress cron from the system scheduler](/kb/wordpress/wordpress-cron/)[Split a child theme's functions.php into included files](/kb/wordpress/child-theme-file-includes/)[WordPress database optimization queries](/kb/wordpress/database-optimization-queries/)[WordPress debugging snippets](/kb/wordpress/debugging-snippets/)[WP-CLI cookbook](/kb/wordpress/wp-cli-cookbook/)[wp-config.php reference](/kb/wordpress/wp-config-reference/)

Other sections[Frappe](/kb/frappe/)[ERPNext](/kb/erpnext/)[Odoo](/kb/odoo/)[NixOS](/kb/nixos/)[Email](/kb/email/)[Linux](/kb/linux/)[Databases](/kb/databases/)[Containers](/kb/containers/)[Proxmox](/kb/proxmox/)[Git & Dev Tools](/kb/git-and-dev-tools/)

WordPressRun WordPress cron from the system scheduler

Disable page-load WP-Cron and run due events from a real server cron job with WP-CLI, including multisite and troubleshooting.

UpdatedOct 1, 2026

Applies toWordPress 6.xWP-CLI 2.x

Tagswordpresscronwp-cliperformance

Reading time3 min

On this page[1. Disable Page-Load Cron](#1-disable-page-load-cron)[2. Add a System Cron Job](#2-add-a-system-cron-job)[Without WP-CLI](#without-wp-cli)[Multisite](#multisite)[3. Verify](#3-verify)[Troubleshooting](#troubleshooting)

By default, WordPress checks for scheduled tasks (WP-Cron) on every page load. On busy sites that adds overhead to visitor requests, and on quiet sites scheduled posts, WooCommerce emails, and Action Scheduler jobs run late or not at all. Moving WP-Cron to the server's scheduler fixes both problems. Do this on every site Avunu hosts.

## 1. Disable Page-Load Cron

Add this to `wp-config.php` above the `/* That's all, stop editing! */` line:

```
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DISABLE_WP_CRON'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
```

Or from the WordPress directory:

```
<span style="--shiki-dark:#FFA657;--shiki-light:#953800">wp</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">config</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">set</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">DISABLE_WP_CRON</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">--raw</span>
```

This only stops page loads from spawning cron. Events are still scheduled as usual and run when something triggers them, which the next step handles.

## 2. Add a System Cron Job

Edit the crontab of the user that owns the WordPress files (not root), for example `sudo crontab -u www-data -e`, and add:

```text
*/5 * * * * wp cron event run --due-now --path=/var/www/example.com/htdocs --quiet
```

`--due-now` runs only events whose time has come.

`--path` points at the WordPress root, so the job doesn't depend on the working directory.

`--quiet` keeps cron from emailing output on every run. Errors still go to stderr.

Cron's `PATH` is minimal. If `wp` isn't in `/usr/bin` or `/usr/local/bin`, use its full path (`command -v wp` shows it).

Every five minutes suits most sites. Use `* * * * *` for stores that depend on timely Action Scheduler jobs (subscription renewals, webhooks).

Tip

Many hosting control panels have a "Cron Jobs" screen for this. Enter the same command there, running as the web app's system user.

### Without WP-CLI

If WP-CLI isn't available, request `wp-cron.php` over HTTP instead:

```text
*/5 * * * * curl -fsS -o /dev/null "https://example.com/wp-cron.php?doing_wp_cron"
```

This goes through the web server, so it's subject to PHP-FPM timeouts and any firewall or basic-auth rules on the site. WP-CLI runs in PHP's command-line mode with no web timeout, so prefer it.

### Multisite

`wp cron event run` only handles one site at a time. Loop over every site in the network:

```text
*/5 * * * * cd /var/www/example.com/htdocs && wp site list --field=url | xargs -I{} wp cron event run --due-now --url={} --quiet
```

## 3. Verify

From the WordPress directory:

```
<span style="--shiki-dark:#FFA657;--shiki-light:#953800">wp</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">cron</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">event</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">list</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">--fields=hook,next_run_relative,recurrence</span>
<span style="--shiki-dark:#FFA657;--shiki-light:#953800">wp</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">cron</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">event</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">run</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">--due-now</span>
```

`wp cron event list` should show nothing with a past `next_run_relative` a few minutes after the cron job is in place. Site Health (Tools > Site Health) also flags late scheduled events.

## Troubleshooting

| Symptom                                              | Check                                                                                                                                         |
| ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Events pile up as overdue                            | The crontab line is under the right user, `wp` is in cron's `PATH`, and `--path` is correct. Run the command by hand as that user.            |
| Duplicate runs or race conditions                    | Page-load cron is still on. Confirm with `wp config get DISABLE_WP_CRON`.                                                                     |
| WooCommerce "Pending" scheduled actions keep growing | Action Scheduler runs from WP-Cron. Check WooCommerce > Status > Scheduled Actions, or work through the queue with `wp action-scheduler run`. |
| Object cache plugin's own cron service is enabled    | Turn off external cron-pinging services (for example Docket Cache's Cronbot) once the server cron works.                                      |

Sources

- [developer.wordpress.org/plugins/cron/hooking-wp-cron-into-the-system-task-scheduler](https://developer.wordpress.org/plugins/cron/hooking-wp-cron-into-the-system-task-scheduler/)
- [developer.wordpress.org/cli/commands/cron/event/run](https://developer.wordpress.org/cli/commands/cron/event/run/)

Need help with WordPress?

Our notes can take you a long way, but sometimes you'd rather have someone who's done it before.

[Websites](/services/websites/)

[← PreviousRegister custom block styles in a classic theme](/kb/wordpress/block-styles-classic-themes/)[Next →Split a child theme's functions.php into included files](/kb/wordpress/child-theme-file-includes/)

CC0This article is in the public domain ([CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/)), code samples included. Use it however helps you.

On this page

- [1. Disable Page-Load Cron](#1-disable-page-load-cron)
- [2. Add a System Cron Job](#2-add-a-system-cron-job)
- [Without WP-CLI](#without-wp-cli)
- [Multisite](#multisite)
- [3. Verify](#3-verify)
- [Troubleshooting](#troubleshooting)

[Back to top↑](#top)

Services

- [ERP implementation](/services/erp/)
- [Odoo](/services/erp/odoo/)
- [ERPNext](/services/erp/erpnext/)
- [Custom software](/services/custom-software/)
- [Devices & IoT](/services/devices-iot/)
- [Websites](/services/websites/)
- [Infrastructure](/services/infrastructure/)

Resources

- [Our work](/work/)
- [Open source](/open-source/)
- [Knowledge base](/kb/)
- [Insights](/insights/)

Company

- [About](/about/)
- [Team](/about/team/)
- [Partners](/partners/)
- [Contact](/contact/)

Clients

- [Project portal](https://erp.avunu.net/projects)
- [Invoices](https://erp.avunu.net/)
- [Support](https://erp.avunu.net/)

[![Avunu](/brand/avunu-logo-light.svg)](/)[\<av-icon data-jx-static>\<svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" stroke="none" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">\<path d="M20.400 20.500h-3.600v-5.600c0-1.300 0-3-1.800-3s-2.100 1.400-2.100 2.900v5.700H9.400V9h3.400v1.600c.5-.9 1.600-1.900 3.400-1.900 3.600 0 4.300 2.400 4.300 5.500v6.300zM5.300 7.400a2.100 2.100 0 1 1 0-4.100 2.100 2.100 0 0 1 0 4.100zm1.800 13.100H3.600V9h3.500v11.500zM22.200 0H1.800C.8 0 0 .8 0 1.700v20.600c0 .9.800 1.700 1.800 1.700h20.400c1 0 1.800-.8 1.800-1.700V1.700C24 .8 23.200 0 22.200 0z">\</path>\</svg>\</av-icon>](https://www.linkedin.com/company/avunu)[\<av-icon data-jx-static>\<svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" stroke="none" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">\<path d="M12 .3a12 12 0 0 0-3.8 23.4c.6.1.8-.3.8-.6v-2c-3.3.7-4-1.6-4-1.6-.6-1.4-1.4-1.8-1.4-1.8-1-.7.1-.7.1-.7 1.2.1 1.8 1.2 1.8 1.2 1 1.8 2.8 1.3 3.5 1 .1-.8.4-1.3.7-1.6-2.7-.3-5.5-1.3-5.5-5.9 0-1.3.5-2.4 1.2-3.2-.1-.3-.5-1.5.1-3.2 0 0 1-.3 3.3 1.2a11.500 11.500 0 0 1 6 0c2.300-1.500 3.300-1.200 3.300-1.200.6 1.700.2 2.900.1 3.200.8.8 1.200 1.900 1.200 3.200 0 4.600-2.800 5.600-5.500 5.900.4.400.8 1.100.8 2.200v3.300c0 .3.2.7.8.6A12 12 0 0 0 12 .3">\</path>\</svg>\</av-icon>](https://github.com/Avunu)[Client portal](https://erp.avunu.net/projects)[Start a project](/start/)

Avunu LLC · 948 East Philadelphia Street, York, PA 17403 · (717) 814-8540Knowledge base articles are in the public domain[Privacy](/privacy/)[Terms](/terms/)
