SchedulerPlugin
Registers the scheduler subsystem: a default no-op Schedule (so an app with nothing configured just runs zero tasks instead of erroring), the SchedulerLock service, and schedule:run.
An app overrides Schedule by binding its own subclass in Config/factories.xml.
Synopsis
Section titled “Synopsis”final class SchedulerPlugin implements PluginInterface
| Implements | PluginInterface |
| Source | SchedulerPlugin.php |
Methods
Section titled “Methods”| Method | Description |
|---|---|
register(PluginRegistrar $registrar): void | Registers the scheduler’s services and console command. |
register()
Section titled “register()”public function register(PluginRegistrar $registrar): void
Registers the scheduler’s services and console command.
Binds Schedule as a singleton to an anonymous subclass that defines no tasks, so an app that has not bound its own schedule runs nothing instead of failing; binds SchedulerLock as a singleton over the configured cache; and registers schedule:run.
| Parameter | Type | Description |
|---|---|---|
$registrar | PluginRegistrar |