Skip to content

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.

final class SchedulerPlugin implements PluginInterface

ImplementsPluginInterface
SourceSchedulerPlugin.php
MethodDescription
register(PluginRegistrar $registrar): voidRegisters the scheduler’s services and console command.

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.

ParameterTypeDescription
$registrarPluginRegistrar