Skip to content
Get started

Cancel a worker schedule

workers.schedules.cancel(strschedule_id, ScheduleCancelParams**kwargs) -> ScheduleCancelResponse
DELETE/api/workers/{workerId}/schedules/{scheduleId}

Cancel a scheduled task for a worker.

ParametersExpand Collapse
worker_id: str
schedule_id: str
ReturnsExpand Collapse
class ScheduleCancelResponse:
cancelled: bool

Cancel a worker schedule

import os
from handinger import Handinger

client = Handinger(
    api_key=os.environ.get("HANDINGER_API_KEY"),  # This is the default and can be omitted
)
response = client.workers.schedules.cancel(
    schedule_id="sch_01HZY31W2SZJ8MJ2FQTR3M1K9D",
    worker_id="t_org_123_w_01HZY2ZJQ8G7K42W2D7WF6V4GM",
)
print(response.cancelled)
{
  "cancelled": true
}
Returns Examples
{
  "cancelled": true
}