<@ULVA73B9P> can i schedule a deployment with cont...
# marvin-ai
t
@Marvin can i schedule a deployment with continuous schedule
m
thought for 85.7 seconds
Not exactly — there is no
ContinuousSchedule
type in Prefect 3.x
. Prefect 3.x deployments support these schedule types: -
Interval
-
Cron
-
RRule
So if by “continuous schedule” you mean a literal
ContinuousSchedule
, the answer is no. If you mean “run continuously / as often as possible,” the closest option is usually an interval schedule, for example every few seconds:
Copy code
python
from datetime import timedelta
from prefect import flow
from prefect.schedules import Interval

@flow
def my_flow():
    print("running")

if __name__ == "__main__":
    my_flow.serve(
        name="my-deployment",
        schedule=Interval(timedelta(seconds=1))
    )
A few caveats: - Prefect schedules create scheduled flow runs at defined times — they are not a “while true” continuous process. - If the flow runtime is longer than the interval, runs can overlap unless you add concurrency controls. - Extremely frequent schedules can put load on your work pool / workers and on the API. If you want, I can help you choose between: - a very short
Interval
- an
RRule
- a long-running polling flow pattern instead of scheduling Docs: Schedules in Prefect 3
t
thanks marvin.. sorry for the tag @Mark