Omar Faruk
07/02/2025, 6:30 AMMarvin
07/02/2025, 6:30 AMMarvin
07/02/2025, 6:31 AMyaml
deployments:
- name: your-deployment-name
schedules:
- schedule: "0 0 * * *" # Your schedule definition
active: true
3. Clean Up Before Deployment:
If you're seeing accumulated schedules, you can:
- Delete the existing deployment before creating a new one
- Use the Prefect UI to manually remove unwanted schedules
- Use the Prefect API to programmatically clean up schedules
4. GitLab CI Implementation:
In your GitLab CI pipeline, you might want to add a cleanup step:
yaml
deploy_flow:
script:
- prefect deployment delete "flow-name/deployment-name" --skip-yes # Optional cleanup
- prefect deploy # Your deployment command
5. Verify Deployment Updates:
After deployment, you can verify the schedules using:
bash
prefect deployment inspect "flow-name/deployment-name"
The most important thing is to ensure that your deployment configuration in prefect.yaml is complete and accurate, as this is the source of truth for your deployment settings, including schedules.
For more details on managing schedules and deployments, you can refer to the Prefect documentation on creating schedules and deployment concepts.