You can pause and resume deployment schedules individually or in bulk.
This can be useful for maintenance windows, migration scenarios, or organizational changes.
Prerequisites
To manage deployment schedules, you need:
Manage specific schedules
To pause or resume individual deployment schedules, you need the deployment name and schedule ID.
List schedules for a deployment
First, list the schedules to get the schedule ID:
Pause a specific schedule
Resume a specific schedule
Manage schedules in bulk
When you have many deployments with active schedules, you can pause or resume all of them at once using the --all flag.
Pause all schedules
Use the --all flag with the pause command to pause all active schedules across all deployments:
This command pauses all active schedules across deployments in the current workspace. In interactive mode, you’ll be asked to confirm.
Example output:
Resume all schedules
Similarly, use the --all flag with the resume command to resume all paused schedules:
This command resumes all paused schedules across deployments in the current workspace. In interactive mode, you’ll be asked to confirm.
Example output:
Skip confirmation prompt
To skip the interactive confirmation (useful for CI/CD pipelines or scripts), use the --no-prompt flag:
Remove all schedules from a deployment
To remove all schedules from a deployment, use prefect deployment schedule clear:
You will be prompted to confirm before schedules are removed.
Skip the confirmation prompt
To skip the confirmation prompt (useful in scripts or CI pipelines), pass the -y flag:
Use cases
Maintenance windows
Pause all schedules during system maintenance:
Development environment management
Quickly pause all schedules in a development environment:
Important notes
Use caution with bulk operationsThe --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.
See also