Expand description
Session-scoped cron scheduler matching Claude Code’s /loop semantics.
The scheduler holds Tasks in memory and (optionally) persists them to
disk so a --resume <session_id> can restore them. Each tick advances due
tasks: recurring tasks have their next_fire updated; one-shot tasks are
removed after firing. Recurring tasks expire 7 days after creation; their
final fire is delivered, then they are removed.
See https://code.claude.com/docs/en/scheduled-tasks for the spec.
Re-exports§
pub use cron::CronExpr;pub use maintenance::resolve_prompt;pub use maintenance::BUILT_IN_MAINTENANCE_PROMPT;
Modules§
- cron
- 5-field cron grammar wrapper.
- jitter
- Deterministic jitter for scheduled task fire times.
- maintenance
- Built-in maintenance prompt +
loop.mddiscovery. - store
- JSON persistence for
super::Schedulerstate.
Structs§
- Fire
- What
Scheduler::tickreturns for each due task. - Scheduler
- Session-scoped cron scheduler.
- Task
- A scheduled prompt + its cadence + bookkeeping fields.
- TaskId
- 8-character base32 task identifier.
Enums§
- Schedule
- What kind of cadence a
Taskruns on. - Scheduler
Error
Constants§
- ALIAS_
DISABLE_ VAR - Crate-specific alias honored alongside
CLAUDE_DISABLE_VAR. - CLAUDE_
DISABLE_ VAR - Env var that disables the scheduler entirely (matches Claude Code spec).
- DEFAULT_
MAX_ TASKS - Session-scoped cap on concurrent tasks (matches Claude Code spec).
- RECURRING_
EXPIRY - Recurring tasks expire this long after creation.