prefect icon indicating copy to clipboard operation
prefect copied to clipboard

Deployment schedule does not maintain state without schedule slug

Open robfreedy opened this issue 1 month ago • 0 comments

Bug summary

Given a deployment schedule that is turned off and that does not have a slug attached to the schedule, the state of the schedule is not maintained when a flow is deployed.

Deployment 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 * * * *")
    )

Screenshot of schedule being off: Image

After running the .deploy command above: Image

Workaround:

Specifying the active parameter fixes this issue or specifying a slug for the schedule

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

robfreedy avatar Oct 28 '25 23:10 robfreedy