Are schedules fixed or based on last run

Are watcher schedules guaranteed to run on the time boundary or do they shift based on the duration of the last watcher run?

If I configure the watch to run every 5 seconds and the watch takes 2 seconds to run does it run at: 0s, 5s, 10s, etc.? Or does it run at 0s, 7s, 14s, etc.?

If I configure a watch to run every 5 seconds and the watch takes 10 seconds to run, does it run at: 0s, 5s, 10s, etc.? Or does it run at 0s, 10s, 20s, etc.? Or does it run at 0s, 15s, 30s, etc.?

1 Like

Watcher will schedule the watch for execution on the interval you've defined. However the same Watch can only run once, so the execution of a Watch depends on if the previous execution of the same Watch has completed.

Also by default each Watch is throttled for 5s, meaning that if the condition of a Watch matches, the actions will only be executed if the last execution was at least 5s ago. This can be disabled by setting throttle_period on the Watch to 0s.