Overview
What this package owns in the runtime
Scheduler adds recurring and delayed jobs to xtask services. It discovers decorated methods after the DI container is ready, runs boot jobs during initialization, starts recurring work on lifecycle ready, and exposes service APIs for inspection and manual execution.
What it provides
- Cron(), Every(), Interval(), and Timeout() decorators declare scheduled jobs on services.
- Supports runOnBoot, runOnInit, named groups, retries, and per-job retry or error hooks.
- SchedulerService lists jobs and groups, and can start, stop, or run them manually.
- Tracks runtime state such as run counts, failures, and the last execution error.
How it fits
- Discovered automatically during CreateApplication() after the container has registered providers.
- Starts recurring jobs on lifecycle ready and stops active handles during app.close().
- Demonstrated by the 11-scheduler_app sample with inspection endpoints and maintenance groups.