Skip to main content

Module scheduler

Module scheduler 

Source
Expand description

The step scheduler: runs a graph one block at a time, in the order its edges allow, and takes a loop round again when its guard says so (docs/specs/SPEC_DRONE_GENERAL_AUTOMATION_2026_11_11.md ยง3.1).

A block is ready when every edge into it, back-edges apart, has been decided (its source ran and the edge carries the run on, or its source was skipped, or a Condition took the other branch). It runs when it has no such edge or at least one of them carries the run on; otherwise it is skipped, and so are the blocks that only it led to.

A back-edge that carries the run on starts the loopโ€™s next iteration: the blocks of the cycle are cleared and its head is ready again. Where a block leaves a loop by an edge that is not taken, the decision is held until nothing else can run, because a later iteration may still take it.

Modulesยง

attention ๐Ÿ”’
A run that needs attention: a step with effects was running when AgentMux stopped, so it may already have done its work (docs/specs/SPEC_DRONE_GENERAL_AUTOMATION_2026_11_11.md ยง3.3).
call ๐Ÿ”’
A Drone block: a step that is another drone (docs/specs/SPEC_DRONE_GENERAL_AUTOMATION_2026_11_11.md ยง3.5).
checkpoint ๐Ÿ”’
The schedulerโ€™s side of checkpoints: what it writes after a block (snapshot, checkpoint) and how it takes a run up again from one (restore) (docs/specs/SPEC_DRONE_GENERAL_AUTOMATION_2026_11_11.md ยง3.3).
foreach ๐Ÿ”’
The for-each block: runs its body block once per item of a list (docs/specs/SPEC_DRONE_GENERAL_AUTOMATION_2026_11_11.md ยง3.1).
join ๐Ÿ”’
A Join block: where branches that split come together (docs/specs/SPEC_DRONE_GENERAL_AUTOMATION_2026_11_11.md ยง3.7).
parallel ๐Ÿ”’
Branches that run at the same time (docs/specs/SPEC_DRONE_GENERAL_AUTOMATION_2026_11_11.md ยง3.7).
replay ๐Ÿ”’
The part of a replay that the scheduler decides: which blocks are stubbed (docs/specs/SPEC_DRONE_GENERAL_AUTOMATION_2026_11_11.md ยง3.3, drone::replay).
wait ๐Ÿ”’
A Wait block: the run stops for a time or for an event (docs/specs/SPEC_DRONE_GENERAL_AUTOMATION_2026_11_11.md ยง3.3, โ€œWaitingโ€).

Structsยง

Limits ๐Ÿ”’
What a run is given besides its graph: its dollar cap, the way to cancel it, and where to keep its checkpoints (none for a run that is not kept).
Scheduler ๐Ÿ”’

Constantsยง

HISTORY_LEN ๐Ÿ”’
How many earlier outputs of a block a later iteration can read as {{block.history}}.

Functionsยง

carries_on ๐Ÿ”’
Whether edge carries the run on once its source has run: a Conditionโ€™s edge only when its handle matches the result.
default_timeout ๐Ÿ”’
How long a block may run when its graph does not say (timeout_seconds): an Agent block 15 minutes, a block that reaches outside the run 5. An API block has its own request timeout, and the rest do no waiting.
dispatch_scoped ๐Ÿ”’
The code of a block that reads and writes only the runโ€™s scope.
execute ๐Ÿ”’
execute_costed ๐Ÿ”’
execute, and with it what the run spent, which a caller counts against its own budget.
finish ๐Ÿ”’
Run what is left of a run that is set up, and say how it ended. started is how setting it up went: a run that could not even keep its first checkpoint ends before its first block.
kind_of ๐Ÿ”’
over_run_cap ๐Ÿ”’
Why the run must not start another block: what its Agent blocks have spent has reached its cap (caps::reached: a run that spent nothing has not reached any cap).
plain_duration ๐Ÿ”’
replay ๐Ÿ”’
Run a replay from first, the new runโ€™s first checkpoint (replay::fork_checkpoint), to its end. graph must be the graph the replayed run was on. Its own checkpoints begin at step 0.
resume ๐Ÿ”’
Take up a run from its newest checkpoint, c, and run it to its end: the blocks that were finished stay finished and what they said is what the rest read. graph must be the graph the checkpoint was written on.
within ๐Ÿ”’
work, or its failure when it takes longer than limit.

Type Aliasesยง

States ๐Ÿ”’