Schedule slug name change causes multiple schedules to be created
Bug summary
When the slug name is changed for a schedule on a deployment, a separate schedule is created on the deployment without replacing the original schedule, so you end up with duplicate schedules.
Python code
minute_flow.from_source(
source=str(Path(__file__).parent),
entrypoint="flow.py:minute_flow",
).deploy(
name="minute-deployment",
work_pool_name="local-work",
schedule=Cron("10 * * * *", slug="robs-test")
)
Schedule created with original slug:
After updating slug name to "robs-test-2"
Version info
Version: 3.4.25
API version: 0.8.4
Python version: 3.13.5
Git commit: 8a37e7b1
Built: Thu, Oct 23, 2025 07:58 PM
OS/Arch: darwin/arm64
Profile: prefect-cloud
Server type: cloud
Pydantic version: 2.12.3
Server:
Database: sqlite
SQLite version: 3.49.1
Additional context
No response
I’d like to work on this. I’ll reproduce the duplicate-schedule behavior locally, identify whether server code or client deploy logic is creating duplicate schedule rows, and propose a fix + tests. Please assign if helpful.
Faith
We also suffer from this. Any update on when it will be fixed?
The slug is used to coordinate between the Python SDK and the API to ensure that the client doesn't clobber any schedules that were created by another client (e.g. the UI). In general, we don't recommend changing the slugs of schedules after creation because those are intended to be a stable reference. If folks are interested in adding a human-friendly display name to schedules, then that might be a good way to have our cake and eat it too.