| Name | Type | Description |
|---|---|---|
assistant_id | str | None | Default: NoneThe assistant ID or graph name to search for. |
thread_id | str | None | Default: Nonethe thread ID to search for. |
enabled | bool | None | Default: None |
metadata | Json | Default: None |
limit | int | Default: 10 |
offset | int | Default: 0 |
headers | Mapping[str, str] | None | Default: None |
params | QueryParamTypes | None | Default: None |
Get a list of cron jobs.
client = get_client(url="http://localhost:2024")
cron_jobs = await client.crons.search(
assistant_id="my_assistant_id",
thread_id="my_thread_id",
enabled=True,
limit=5,
offset=5,
)
print(cron_jobs)
----------------------------------------------------------
[
{
'cron_id': '1ef3cefa-4c09-6926-96d0-3dc97fd5e39b',
'assistant_id': 'my_assistant_id',
'thread_id': 'my_thread_id',
'user_id': None,
'payload':
{
'input': {'start_time': ''},
'schedule': '4 * * * *',
'assistant_id': 'my_assistant_id'
},
'schedule': '4 * * * *',
'next_run_date': '2024-07-25T17:04:00+00:00',
'end_time': None,
'created_at': '2024-07-08T06:02:23.073257+00:00',
'updated_at': '2024-07-08T06:02:23.073257+00:00'
}
]The enabled status to search for.
Metadata to filter by. Exact match filter for each KV pair.
The maximum number of results to return.
The number of results to skip.
Optional custom headers to include with the request.
Optional query parameters to include with the request.