Thomas DeBroux
08/22/2024, 3:34 PMMarvin
08/22/2024, 3:35 PMprefect.yaml
file for such specific timing (e.g., every 5 minutes between 9 AM and 5 PM) is not very straightforward with the interval
keyword alone. However, you can accomplish this using a cron
schedule.
Here’s an example of how you can define this schedule in your prefect.yaml
file:
yaml
deployments:
- name: your_deployment
schedule:
cron: "*/5 9-16 * * *"
timezone: "Your/Timezone" # Replace with your timezone, e.g., America/New_York
A quick breakdown:
- */5
means every 5 minutes.
- 9-16
restricts this to the hours from 9 AM to 4:59 PM.
Here's a link to more information on Prefect schedules: Prefect Schedules Documentation
If you have further questions, feel free to ask!Thomas DeBroux
08/22/2024, 3:36 PMMarvin
08/22/2024, 3:36 PM