docs/v3/how-to-guides/deployments/manage-schedules.mdx
You can pause and resume deployment schedules individually or in bulk. This can be useful for maintenance windows, migration scenarios, or organizational changes.
To manage deployment schedules, you need:
To pause or resume individual deployment schedules, you need the deployment name and schedule ID.
First, list the schedules to get the schedule ID:
prefect deployment schedule ls my-flow/my-deployment
prefect deployment schedule pause my-flow/my-deployment <schedule-id>
prefect deployment schedule resume my-flow/my-deployment <schedule-id>
When you have many deployments with active schedules, you can pause or resume all of them at once using the --all flag.
Use the --all flag with the pause command to pause all active schedules across all deployments:
prefect deployment schedule pause --all
This command pauses all active schedules across deployments in the current workspace. In interactive mode, you'll be asked to confirm.
Example output:
Paused schedule for deployment my-flow/daily-sync
Paused schedule for deployment data-pipeline/hourly-update
Paused schedule for deployment ml-model/weekly-training
Paused 3 deployment schedule(s).
Similarly, use the --all flag with the resume command to resume all paused schedules:
prefect deployment schedule resume --all
This command resumes all paused schedules across deployments in the current workspace. In interactive mode, you'll be asked to confirm.
Example output:
Resumed schedule for deployment my-flow/daily-sync
Resumed schedule for deployment data-pipeline/hourly-update
Resumed schedule for deployment ml-model/weekly-training
Resumed 3 deployment schedule(s).
To skip the interactive confirmation (useful for CI/CD pipelines or scripts), use the --no-prompt flag:
prefect --no-prompt deployment schedule pause --all
prefect --no-prompt deployment schedule resume --all
Pause all schedules during system maintenance:
# Before maintenance
prefect deployment schedule pause --all
# Perform maintenance tasks...
# After maintenance
prefect deployment schedule resume --all
Quickly pause all schedules in a development environment:
# Pause all dev schedules
prefect --profile dev deployment schedule pause --all
# Resume when ready
prefect --profile dev deployment schedule resume --all
The --all flag affects all deployment schedules in your workspace.
In interactive mode, you'll be prompted to confirm the operation showing the exact number of schedules that will be affected.
Always verify you're in the correct workspace/profile before running bulk operations.
</Warning>