Skip to content

cmem_client.models.scheduler¤

Scheduler models

A scheduler is the DataIntegration task which starts a workflow on a fixed interval. The schedulers of all projects are the items of client.schedulers, keyed by {project_id}:{scheduler_id}.

Classes:

Scheduler¤

Bases: Model, ReadRepositoryItem

A workflow scheduler task.

Attributes:

Functions:

  • get_id – Get the scheduler ID in the form ‘project_id:scheduler_id’.

get_id¤

get_id()

Get the scheduler ID in the form ‘project_id:scheduler_id’.

id¤

id: str
item_links: list[SchedulerItemLink] = Field(default_factory=list, alias='itemLinks')

label¤

label: str

model_config¤

model_config = ConfigDict(extra='allow', populate_by_name=True)

parameters¤

parameters: SchedulerParameters

project_id¤

project_id: str = Field(alias='projectId')

Bases: Model

A link associated with a scheduler.

Attributes:

  • path (str) – Path the link points at, relative to the DataIntegration user interface.
  • label (str | None) – Text shown for the link.

label¤

label: str | None = None

model_config¤

model_config = ConfigDict(extra='allow', populate_by_name=True)

path¤

path: str

SchedulerParameters¤

Bases: Model

Parameters of a scheduler task.

Attributes:

  • interval (str) – How often the workflow is started, as an ISO 8601 duration such as PT1H.
  • enabled (bool) – Whether the scheduler currently runs. A disabled scheduler keeps its interval but does not start anything.
  • task (str) – ID of the workflow the scheduler starts.

Functions:

  • extract_task_id – Extract task ID from either a plain string or a dict with a ‘value’ key.
  • parse_enabled – Convert API string ‘true’/’false’ to bool.
  • serialize_enabled – Serialize bool back to API string format.

enabled¤

enabled: bool

extract_task_id¤

extract_task_id(v)

Extract task ID from either a plain string or a dict with a ‘value’ key.

interval¤

interval: str

model_config¤

model_config = ConfigDict(extra='allow', populate_by_name=True)

parse_enabled¤

parse_enabled(v)

Convert API string ‘true’/’false’ to bool.

serialize_enabled¤

serialize_enabled(v)

Serialize bool back to API string format.

task¤

task: str

SchedulerSearchResults¤

Bases: Model

Wrapper for the task search API response containing schedulers.

Attributes:

model_config¤

model_config = ConfigDict(extra='allow', populate_by_name=True)

results¤

results: list[Scheduler]

Comments