Wp cron test (WP-CLI)

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen
$ wp help cron test

NAME

  wp cron test

DESCRIPTION

  Tests the WP Cron spawning system and reports back its status.

SYNOPSIS

  wp cron test 

  This command tests the spawning system by performing the following steps:

  * Checks to see if the `DISABLE_WP_CRON` constant is set; errors if true
  because WP-Cron is disabled.
  * Checks to see if the `ALTERNATE_WP_CRON` constant is set; warns if true.
  * Attempts to spawn WP-Cron over HTTP; warns if non 200 response code is
  returned.

EXAMPLES

    # Cron test runs successfully.
    $ wp cron test
    Success: WP-Cron spawning is working as expected.

Example

2023.12.05, on a site where there is a problem with too many cron jobs:

$ wp cron test

Error: The DISABLE_WP_CRON constant is set to true. WP-Cron spawning is disabled.