Skip to main content

Module clock

Module clock 

Source
Expand description

When a scheduled pipeline is next due, and whether it should actually fire.

§Why a tick can be skipped

A pipeline whose previous wave has not finished is still working. Starting a second copy means paying twice for one result and, where agents share a workspace, two of them writing to the same files. Skipping means being one interval late. For unattended spending those are not comparable, so the default is to skip — and overlap = "allow" opts back in for pipelines where a second copy is harmless.

A skip is reported rather than swallowed. A schedule that quietly skips every tick because its work always overruns looks exactly like a schedule that is running fine, and the difference is that nothing is happening.

§Why the next fire is computed from the schedule, not from the last run

Adding an interval to when the last run finished makes the period drift by however long the work took, so an hourly job slowly becomes a ninety-minute job. Both forms here are computed from the clock: cron by its own definition, and every by stepping forward from the previous due time until it is in the future. Stepping — rather than adding one interval to now — means a Tower that was asleep for six hours does not fire six times in a row when it wakes.

Structs§

Clock
The next due time for every scheduled pipeline.
Due
What a tick found.

Enums§

Skipped
Why a pipeline that was due did not start.