Skip to content

Deployment schedule does not maintain state without schedule slug #19302

@robfreedy

Description

@robfreedy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions