Skip to main content
Scheduling lets MobKit trigger actions on a recurring basis. Define schedules with cron-like intervals, and MobKit evaluates them at each tick to determine which are due.

Schedule definitions

A schedule is defined by a ScheduleDefinition:

Evaluation

Schedules are evaluated at discrete ticks using evaluate_schedules_at_tick:
The evaluation returns a ScheduleEvaluation containing the tick timestamp and a sorted vector of ScheduleTrigger entries for every schedule that is due at that tick.

Trigger ordering

Due triggers are sorted by:
  1. due_tick_ms (ascending)
  2. schedule_id (alphabetical)
  3. interval (alphabetical)
  4. timezone (alphabetical)
This ensures deterministic dispatch ordering when multiple schedules fire at the same tick.

Dispatch

When a schedule fires, the runtime dispatches it through the scheduling module via MCP tool call. The dispatch report includes:

Validation

Schedule definitions are validated before evaluation:
  • Schedule IDs must be non-empty and unique (after canonicalization)
  • Intervals must be valid cron expressions
  • Timezones must be valid IANA timezone names
Invalid definitions produce typed ScheduleValidationError variants:

Limits

The RPC API enforces a maximum of 256 schedules per request (MAX_SCHEDULES_PER_REQUEST). This prevents unbounded evaluation cost.

See also