Title: wp_doing_cron
Published: June 15, 2017
Last modified: February 24, 2026

---

# apply_filters( ‘wp_doing_cron’, bool $wp_doing_cron )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/wp_doing_cron/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/wp_doing_cron/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/wp_doing_cron/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/wp_doing_cron/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/wp_doing_cron/?output_format=md#wp--skip-link--target)

Filters whether the current request is a WordPress cron request.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/wp_doing_cron/?output_format=md#parameters)󠁿

 `$wp_doing_cron`bool

Whether the current request is a WordPress cron request.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/wp_doing_cron/?output_format=md#source)󠁿

    ```php
    return apply_filters( 'wp_doing_cron', defined( 'DOING_CRON' ) && DOING_CRON );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/load.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/load.php#L1789)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/load.php#L1789-L1789)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/wp_doing_cron/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_doing_cron()](https://developer.wordpress.org/reference/functions/wp_doing_cron/)`wp-includes/load.php` |

Determines whether the current request is a WordPress cron request.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/wp_doing_cron/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.8.0](https://developer.wordpress.org/reference/since/4.8.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fwp_doing_cron%2F)
before being able to contribute a note or feedback.