Skip to content
Get started

List worker schedules

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

List scheduled tasks for a worker.

ParametersExpand Collapse
worker_id: String
ReturnsExpand Collapse
class ScheduleListResponse { schedules, worker_id }
schedules: Array[WorkerSchedule]
One of the following:
class Scheduled { id, budget, input, 2 more }
id: String
budget: :low | :standard | :high | :unlimited
One of the following:
:low
:standard
:high
:unlimited
input: String
next_run_at: Time
formatdate-time
type: :scheduled
class Delayed { id, budget, delay_in_seconds, 3 more }
id: String
budget: :low | :standard | :high | :unlimited
One of the following:
:low
:standard
:high
:unlimited
delay_in_seconds: Integer
input: String
next_run_at: Time
formatdate-time
type: :delayed
class Cron { id, budget, cron, 3 more }
id: String
budget: :low | :standard | :high | :unlimited
One of the following:
:low
:standard
:high
:unlimited
cron: String
input: String
next_run_at: Time
formatdate-time
type: :cron
class Interval { id, budget, input, 3 more }
id: String
budget: :low | :standard | :high | :unlimited
One of the following:
:low
:standard
:high
:unlimited
input: String
interval_seconds: Integer
next_run_at: Time
formatdate-time
type: :interval
worker_id: String

List worker schedules

require "handinger"

handinger = Handinger::Client.new(api_key: "My API Key")

schedules = handinger.workers.schedules.list("t_org_123_w_01HZY2ZJQ8G7K42W2D7WF6V4GM")

puts(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"
}