Scheduled flow runs can be late or delayed for several reasons:
1.
Resource Availability: If there aren't enough resources (e.g., workers) available to execute the run when it's scheduled, the run may be delayed.
2.
Dependencies: If the flow has dependencies on other tasks or flows that haven't completed yet, this can cause a delay.
3.
Backpressure: If many flow runs are scheduled to start at the same time, it can cause backpressure, leading to delays.
4.
System Issues: System issues or network problems can also contribute to delays in starting the flow runs.
Here are some links for further details:
- Prefect Schedules:
Concepts Schedules
- Example of handling late runs:
Using the Client to Reschedule
- Relevant GitHub issues:
-
Creating Scheduled Flow Run for Deployment
-
Intended Run DateTime Display
If you need to reschedule late runs specifically, you can use the
client.create_flow_run
method with a
Scheduled
state to set a new scheduled time.