Crons ClientPython SDK
Bases: BaseRestClient
The cron client is a client for managing cron workflows within Hatchet.
Methods:
| Name | Description |
|---|---|
aio_create | Create a new workflow cron trigger. |
aio_delete | Delete a workflow cron trigger. |
aio_get | Retrieve a specific workflow cron trigger by ID. |
aio_list | Retrieve a list of all workflow cron triggers matching the criteria. |
create | Create a new workflow cron trigger. |
delete | Delete a workflow cron trigger. |
get | Retrieve a specific workflow cron trigger by ID. |
list | Retrieve a list of all workflow cron triggers matching the criteria. |
Functions
aio_create
Create a new workflow cron trigger.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workflow_name | str | The name of the workflow to trigger. | required |
cron_name | str | The name of the cron trigger. | required |
expression | str | The cron expression defining the schedule. | required |
input | JSONSerializableMapping | The input data for the cron workflow. | required |
additional_metadata | JSONSerializableMapping | Additional metadata associated with the cron trigger. | required |
priority | Literal['LOW', 'MEDIUM', 'HIGH'] | None | The priority of the cron workflow trigger. | None |
Returns:
| Type | Description |
|---|---|
CronTrigger | The created cron trigger. |
aio_delete
Delete a workflow cron trigger.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cron_id | str | The ID of the cron trigger to delete. | required |
Returns:
| Type | Description |
|---|---|
None | None |
aio_get
Retrieve a specific workflow cron trigger by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cron_id | str | The ID of the cron trigger to retrieve. | required |
Returns:
| Type | Description |
|---|---|
CronTrigger | The requested cron trigger. |
aio_list
Retrieve a list of all workflow cron triggers matching the criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
offset | int | None | The offset to start the list from. | None |
limit | int | None | The maximum number of items to return. | None |
workflow_id | str | None | The ID of the workflow to filter by. | None |
additional_metadata | JSONSerializableMapping | None | Filter by additional metadata keys. | None |
order_by_field | Literal['name', 'created_at'] | None | The field to order the list by. | None |
order_by_direction | Literal['asc', 'desc'] | None | The direction to order the list by. | None |
workflow_name | str | None | The name of the workflow to filter by. | None |
cron_name | str | None | The name of the cron trigger to filter by. | None |
Returns:
| Type | Description |
|---|---|
list[CronTrigger] | A list of cron triggers. |
create
Create a new workflow cron trigger.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workflow_name | str | The name of the workflow to trigger. | required |
cron_name | str | The name of the cron trigger. | required |
expression | str | The cron expression defining the schedule. | required |
input | JSONSerializableMapping | The input data for the cron workflow. | required |
additional_metadata | JSONSerializableMapping | Additional metadata associated with the cron trigger. | required |
priority | Literal['LOW', 'MEDIUM', 'HIGH'] | None | The priority of the cron workflow trigger. | None |
Returns:
| Type | Description |
|---|---|
CronTrigger | The created cron trigger. |
delete
Delete a workflow cron trigger.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cron_id | str | The ID of the cron trigger to delete. | required |
Returns:
| Type | Description |
|---|---|
None | None |
get
Retrieve a specific workflow cron trigger by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cron_id | str | The ID of the cron trigger to retrieve. | required |
Returns:
| Type | Description |
|---|---|
CronTrigger | The requested cron trigger. |
list
Retrieve a list of all workflow cron triggers matching the criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
offset | int | None | The offset to start the list from. | None |
limit | int | None | The maximum number of items to return. | None |
workflow_id | str | None | The ID of the workflow to filter by. | None |
additional_metadata | JSONSerializableMapping | None | Filter by additional metadata keys. | None |
order_by_field | Literal['name', 'created_at'] | None | The field to order the list by. | None |
order_by_direction | Literal['asc', 'desc'] | None | The direction to order the list by. | None |
workflow_name | str | None | The name of the workflow to filter by. | None |
cron_name | str | None | The name of the cron trigger to filter by. | None |
Returns:
| Type | Description |
|---|---|
list[CronTrigger] | A list of cron triggers. |
Last updated on November 13, 2026