JobScheduler
in package
FinalYes
Runtime-detecting factory for the async job port.
Picks ActionSchedulerDriver when the Action Scheduler API is loaded
(WooCommerce ships it; it can also be installed standalone) and falls back
to WpCronDriver otherwise. Detection happens at call time, so build
the scheduler after plugins_loaded — probing earlier would miss an
Action Scheduler loaded by another plugin.
Table of Contents
Methods
Methods
make()
public
static make([string $group = '' ][, null|bool $actionScheduler = null ]) : JobSchedulerInterface
Parameters
- $group : string = ''
-
Action Scheduler group tag (ignored by the WP-Cron fallback)
- $actionScheduler : null|bool = null
-
force the driver choice (true = Action Scheduler, false = WP-Cron); null auto-detects