Skip to content

prefect.deployments.schedules

create_deployment_schedule_create(schedule, active=True, max_active_runs=None, catchup=False)

Create a DeploymentScheduleCreate object from common schedule parameters.

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