The SchedulerSystem runs delayed and repeating jobs inside SaffronLibrary. Callers describe a job with a Config, send it as a command, and the scheduler executes it from the Unity update loop until it finishes or is cancelled.
Within SaffronLibrary, this system is the Scheduler domain (Domain.Scheduler). It receives scheduling commands from the CommandBus, ticks through the UpdateSystem, and reports pause and resume state on the EventBus.
Key responsibilities:
- Accept scheduling, pause, resume, and cancel commands, and build the job records for them.
- Count down each job's delay every tick, run jobs that are due, and handle repeats and removal.
- Expose a small static API (
SchedulerCommandFactory,SchedulerEventFactory) so callers never build scheduler messages by hand.
Who should use this: gameplay and feature developers who need timed or repeating callbacks, and engineers who maintain the scheduler or write the project-specific SchedulerManager subclass that implements event handling.