Expand description
Scheduled capability trait and types for cron-style background work.
Plugins declare a set of Schedules at init time; the host-owned
scheduler ticks, decides which schedules are due, and calls
ScheduledPlugin::run for each one. The plugin returns a result and
execution continues on the next tick.
Schedules are declarative, not dynamic. A plugin returns its schedule
list once from ScheduledPlugin::schedules; there is no runtime
register_schedule host function. This mirrors the existing built-in
scheduler in bext-core::scheduler (driven by [[tasks]] in
bext.config.toml) and keeps the shape introspectable at install time —
the registry resolver, the dev dashboard, and cap_conformance can all
enumerate a plugin’s schedules without running it.
Data types are plain POD with String/u64/enum fields so the trait
stays ABI-compatible with the WASM guest crate (matches the convention
used by crate::lifecycle::LifecyclePlugin — JSON strings, Result<_, String>, no framework types). The bext-core side owns the rich
scheduler::Schedule enum and converts to/from this POD shape at the
host boundary.
Modules§
- fuel
- Fuel budgets for WASM scheduled plugin calls.
Structs§
- Schedule
- A single declared schedule.
- Scheduled
RunCtx - Context supplied to a single invocation of
ScheduledPlugin::run.
Enums§
- Locking
Hint - Hint to the scheduler about distributed-locking requirements.
- Missed
RunPolicy - How the scheduler should behave when it discovers a schedule that was due to fire while the host was down, restarting, or otherwise not ticking.
Traits§
- Scheduled
Plugin - A plugin that declares cron-style background work.