# Run WP-Cron From a Real Cron Job

> Stops WordPress from checking for scheduled tasks on every page view; you trigger wp-cron.php from your server's cron instead, which is faster and more reliable.

- Type: PHP
- Runs: Run everywhere
- Category: [Performance](https://wpide.com/library/category/performance/)
- Tags: performance, cron, server
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/disable-wp-cron-page-loads/

## Code

```php
// After enabling, add a server cron job, for example every 5 minutes:
// */5 * * * * curl -s https://example.com/wp-cron.php?doing_wp_cron > /dev/null
if ( ! defined( 'DISABLE_WP_CRON' ) ) {
    define( 'DISABLE_WP_CRON', true );
}
```

## Notes

Without the server cron job, scheduled posts, backups and emails stop running.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Run WP-Cron From a Real Cron Job" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
