Guilins
01/13/2025, 8:47 PMMarvin
01/13/2025, 8:47 PMprefect.yaml file, you can specify a schedules section. Here's an example of how you might set it up:
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.Guilins
01/13/2025, 9:01 PMMarvin
01/13/2025, 9:01 PMCron schedule instead of an Interval schedule in your prefect.yaml file:
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.