<@ULVA73B9P> is there a way to add multiple schedu...
# marvin-ai
u
@Marvin is there a way to add multiple schedule to a deployment with prefect.yaml
m
thought for 747.5 seconds
Yes — in Prefect 3.x you can attach multiple schedules to a single deployment directly in prefect.yaml by using a schedules list on the deployment. Example prefect.yaml snippet:
Copy code
deployments:
  - name: my-deployment
    entrypoint: flows/my_flow.py:my_flow
    work_pool:
      name: my-pool
    parameters: {}
    schedules:
      # Cron example
      - cron: "0 * * * *"
        timezone: "UTC"
        active: true

      # Interval example (every 15 minutes)
      - interval: 900
        timezone: "UTC"
        active: true

      # RRule example (weekdays at 09:00 New York time)
      - rrule: "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR;BYHOUR=9;BYMINUTE=0;BYSECOND=0"
        timezone: "America/New_York"
        active: true
Notes: - Each item in schedules can be one of cron, interval, or rrule, plus optional fields like timezone, active, and parameters (to override parameters per schedule). - After adding to prefect.yaml, run
prefect deploy
from your project to register/update the deployment and its schedules. - You can also manage schedules via the CLI: - List schedules:
prefect deployment schedule ls "<flow-name>/<deployment-name>"
- Create additional schedules interactively:
prefect deployment schedule create --help
Docs for reference: - Create schedules for deployments - Schedules concept If you share your current prefect.yaml (minus secrets), I can help tailor the schedules block.