-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcron-concurrent.php
More file actions
31 lines (27 loc) · 873 Bytes
/
cron-concurrent.php
File metadata and controls
31 lines (27 loc) · 873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**
* Plugin Name: WP-CLI Cron Concurrent
* Description: Runs WordPress cron tasks concurrently via wp-cli.
* Version: 1.0.1
* Author: dd32
* License: MIT
*/
/**
* WP-CLI Cron Concurrent – entry point.
*
* Loaded automatically by WP-CLI when this package is installed via Composer,
* or explicitly via `--require` / a `wp-cli.yml` require entry.
* Registers the `wp cron-concurrent` command group.
*
* @package dd32/wpcli-cron-concurrent
*/
if ( ! class_exists( 'WP_CLI' ) ) {
return;
}
// When installed as a Composer package the classmap autoloader already
// handles this file; the direct require is only a safety-net for manual
// --require usage (e.g. inside wp-env test containers).
if ( ! class_exists( 'CronConcurrent' ) ) {
require_once __DIR__ . '/src/CronConcurrent.php';
}
WP_CLI::add_command( 'cron-concurrent', 'CronConcurrent' );