<@ULVA73B9P> give me an example of a flow configur...
# ask-marvin
g
@Marvin give me an example of a flow configuration in a prefect.yaml file that contains the schedules parameter
m
To define a flow configuration with a schedule in a
prefect.yaml
file, you can specify a
schedules
section. Here's an example of how you might set it up:
Copy code
yaml
name: my_flow
description: A simple flow with a schedule
version: 1.0

schedules:
  - type: Interval
    interval: 600  # seconds
    start_date: "2026-01-01T00:00:00Z"
    timezone: "America/Chicago"
    active: true
In this example, the schedule is set to run the flow every 10 minutes, starting at midnight on January 1, 2026, in the America/Chicago timezone. You can choose from different schedule types like
Cron
,
Interval
, and
RRule
depending on your needs. For more details on creating schedules and other configurations, you can refer to the Prefect documentation on adding schedules.
g
@Marvin modify the schedule to use cron instead of interval
m
Here's how you can modify the schedule to use a
Cron
schedule instead of an
Interval
schedule in your
prefect.yaml
file:
Copy code
yaml
name: my_flow
description: A simple flow with a cron schedule
version: 1.0

schedules:
  - type: Cron
    cron: "0 * * * *"  # Every hour on the hour
    timezone: "America/Chicago"
    active: true
In this example, the flow is scheduled to run every hour on the hour using a cron expression. You can adjust the cron expression to fit your specific scheduling needs. For more details, you can refer to the Prefect documentation on adding schedules.