wp_doing_cron

The timeline below displays how wordpress function wp_doing_cron has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 4.8

/**
 * Determines whether the current request is a WordPress cron request.
 *
 * @since 4.8.0
 *
 * @return bool True if it's a WordPress cron request, false otherwise.
 */
function wp_doing_cron()
{
    /**
     * Filters whether the current request is a WordPress cron request.
     *
     * @since 4.8.0
     *
     * @param bool $wp_doing_cron Whether the current request is a WordPress cron request.
     */
    return apply_filters('wp_doing_cron', defined('DOING_CRON') && DOING_CRON);
}