Skip to content

prefect.deployments.schedules

create_deployment_schedule_create(schedule, active=True)

Create a DeploymentScheduleCreate object from common schedule parameters.

Source code in src/prefect/deployments/schedules.py
14
15
16
17
18
19
20
21
22
def create_deployment_schedule_create(
    schedule: "SCHEDULE_TYPES",
    active: Optional[bool] = True,
) -> DeploymentScheduleCreate:
    """Create a DeploymentScheduleCreate object from common schedule parameters."""
    return DeploymentScheduleCreate(
        schedule=schedule,
        active=active if active is not None else True,
    )