Skip to content
docsv0.1.1

CronProviderInterface

Contract for plugins that contribute scheduled tasks — the cron-domain counterpart to `ToolProviderInterface` (`milpa/core`, `Milpa\Interfaces\Tooling\ToolProviderInterface`): same shape, same idea, one method returning the plugin's contribution. A host command (Task 11) collects `cronTasks()` from every booted plugin implementing this interface and registers them into a {@see CronRegistry} alongside the host's own `config/cron.php` tasks.

CronProviderInterface::cronTasks()

abstract public function cronTasks(): array

The tasks this plugin wants scheduled. Called during cron registry assembly, not during plugin boot — implementations should build and return the list, not register it anywhere themselves.