Skip to main content

Module scheduler

Module scheduler 

Source
Expand description

Background-job scheduler skeleton.

The host owns a single scheduler that drives every registered crate::traits::background::BackgroundJobProvider. This module ships the scheduler’s public API + persistent state record + a SchedulerPersistence trait. The host-side Tokio driver (crates/uni/src/scheduler.rs) wraps a loop that calls tick_at(SystemTime::now()), dispatches the returned jobs through the plugin registry, and forwards lifecycle transitions to the configured persistence backend.

Structs§

MemoryPersistence
In-memory SchedulerPersistence backend. Always returns an empty load_all; every other call is a no-op.
Scheduler
Host-side scheduler skeleton.
SchedulerHandle
Cooperative-cancel handle handed to job implementations.
SchedulerJobRecord
Persistable record of a scheduled job’s state.

Enums§

SchedulerJobStatus
Lifecycle state of one scheduled job.
SchedulerPersistenceError
Errors raised by SchedulerPersistence backends.

Traits§

SchedulerControl
Trait-object handle to a scheduler, for cross-crate callers that can’t depend on the concrete host-side SchedulerHost type.
SchedulerPersistence
Persistence backend for Scheduler job state.