package domain import "context" // Scheduler is the abstraction for a recurring job scheduler. type Scheduler interface { // Start begins executing the scheduled job. Start() // Stop halts the scheduler and returns a context that is cancelled // once all in-flight jobs have completed. Stop() (stoppedCtx context.Context) }