Skip to content
Get started

List worker schedules

workers.schedules.list(strworker_id) -> ScheduleListResponse
GET/api/workers/{workerId}/schedules

List scheduled tasks for a worker.

ParametersExpand Collapse
worker_id: str
ReturnsExpand Collapse
class ScheduleListResponse:
schedules: List[WorkerSchedule]
One of the following:
class UnionMember0:
id: str
budget: Literal["low", "standard", "high", "unlimited"]
One of the following:
"low"
"standard"
"high"
"unlimited"
input: str
next_run_at: datetime
formatdate-time
type: Literal["scheduled"]
class UnionMember1:
id: str
budget: Literal["low", "standard", "high", "unlimited"]
One of the following:
"low"
"standard"
"high"
"unlimited"
delay_in_seconds: int
input: str
next_run_at: datetime
formatdate-time
type: Literal["delayed"]
class UnionMember2:
id: str
budget: Literal["low", "standard", "high", "unlimited"]
One of the following:
"low"
"standard"
"high"
"unlimited"
cron: str
input: str
next_run_at: datetime
formatdate-time
type: Literal["cron"]
class UnionMember3:
id: str
budget: Literal["low", "standard", "high", "unlimited"]
One of the following:
"low"
"standard"
"high"
"unlimited"
input: str
interval_seconds: int
next_run_at: datetime
formatdate-time
type: Literal["interval"]
worker_id: str

List worker schedules

import os
from handinger import Handinger

client = Handinger(
    api_key=os.environ.get("HANDINGER_API_KEY"),  # This is the default and can be omitted
)
schedules = client.workers.schedules.list(
    "t_org_123_w_01HZY2ZJQ8G7K42W2D7WF6V4GM",
)
print(schedules.schedules)
{
  "schedules": [
    {
      "id": "id",
      "budget": "low",
      "input": "input",
      "nextRunAt": "2019-12-27T18:11:19.117Z",
      "type": "scheduled"
    }
  ],
  "workerId": "workerId"
}
Returns Examples
{
  "schedules": [
    {
      "id": "id",
      "budget": "low",
      "input": "input",
      "nextRunAt": "2019-12-27T18:11:19.117Z",
      "type": "scheduled"
    }
  ],
  "workerId": "workerId"
}