Update a cron job by ID.
update(
self,
cron_id: str,
*,
schedule: str | None = None,
end_time: datetime | None = None,
input: Input | None = None,
metadata: Mapping[str, Any] | None = None,
config: Config | None = None,
context: Context | None = None,
webhook: str | None = None,
interrupt_before: All | list[str] | None = None,
interrupt_after: All | list[str] | None = None,
on_run_completed: OnCompletionBehavior | None = None,
enabled: bool | None = None,
stream_mode: StreamMode | Sequence[StreamMode] | None = None,
stream_subgraphs: bool | None = None,
stream_resumable: bool | None = None,
durability: Durability | None = None,
headers: Mapping[str, str] | None = None,
params: QueryParamTypes | None = None
) -> Cronclient = get_client(url="http://localhost:2024")
updated_cron = await client.crons.update(
cron_id="1ef3cefa-4c09-6926-96d0-3dc97fd5e39b",
schedule="0 10 * * *",
enabled=False,
)| Name | Type | Description |
|---|---|---|
cron_id* | str | The cron ID to update. |
schedule | str | None | Default: NoneThe cron schedule to execute this job on. Schedules are interpreted in UTC. |
end_time | datetime | None | Default: NoneThe end date to stop running the cron. |
input | Input | None | Default: NoneThe input to the graph. |
metadata | Mapping[str, Any] | None | Default: NoneMetadata to assign to the cron job runs. |
config | Config | None | Default: NoneThe configuration for the assistant. |
context | Context | None | Default: NoneStatic context added to the assistant. |
webhook | str | None | Default: NoneWebhook to call after LangGraph API call is done. |
interrupt_before | All | list[str] | None | Default: NoneNodes to interrupt immediately before they get executed. |
interrupt_after | All | list[str] | None | Default: NoneNodes to interrupt immediately after they get executed. |
on_run_completed | OnCompletionBehavior | None | Default: NoneWhat to do with the thread after the run completes. Must be one of 'delete' or 'keep'. 'delete' removes the thread after execution. 'keep' creates a new thread for each execution but does not clean them up. |
enabled | bool | None | Default: NoneEnable or disable the cron job. |
stream_mode | StreamMode | Sequence[StreamMode] | None | Default: NoneThe stream mode(s) to use. |
stream_subgraphs | bool | None | Default: NoneWhether to stream output from subgraphs. |
stream_resumable | bool | None | Default: NoneWhether to persist the stream chunks in order to resume the stream later. |
durability | Durability | None | Default: NoneDurability level for the run. Must be one of 'sync', 'async', or 'exit'. |
headers | Mapping[str, str] | None | Default: NoneOptional custom headers to include with the request. |
params | QueryParamTypes | None | Default: NoneOptional query parameters to include with the request. |