API reference
Schedules
Cron expressions with time zones that create a job every time they fire.
Overview
A schedule creates a job on a cron expression, in the time zone you choose, so 0 2 * * * in Europe/Amsterdam means 2 AM local time all year, across daylight saving changes.
Each firing creates an ordinary job with the schedule's queue, task and payload. The job's schedule field points back here.
- Endpoints
- 5
- ID prefix
- sch_
- Attributes
- 15
The schedule object
Every schedule endpoint returns this object, or a list of them. Attributes marked null are always present in the response, so you can rely on the shape.
Attributes
idstringUnique identifier, prefixed with sch_.
objectstringAlways schedule.
namestringUnique name within your project.
cronstringFive-field cron expression, such as 0 2 * * *.
timezonestringIANA time zone the expression is read in.
queuestringQueue each job is created on.
taskstringTask each job runs.
payloadobjectPayload copied into each job.
statusenumactive or paused.
overlapenumWhat happens when the previous job is still running: skip, queue or allow.
next_run_attimestamp | nullNext firing in UTC, or null while paused.
last_run_attimestamp | nullMost recent firing in UTC.
last_jobstring | nullID of the job created by the most recent firing.
created_attimestampWhen the object was created, in ISO 8601 UTC.
livemodebooleantrue for objects created with a live key, false for the test sandbox.
{ "id": "sch_2Mf6Xb8Qn4", "object": "schedule", "name": "nightly-report", "cron": "0 2 * * *", "timezone": "Europe/Amsterdam", "queue": "reports", "task": "build-daily-report", "payload": { "format": "pdf" }, "status": "active", "overlap": "skip", "next_run_at": "2026-10-15T00:00:00Z", "last_run_at": "2026-10-14T00:00:00Z", "last_job": "job_8Vx1Lk5Pq3", "created_at": "2026-09-02T14:20:11Z", "livemode": false}Create a schedule
/v3/schedulesCreates a schedule that starts firing at its next matching time.
Body parameters
namestringrequiredUnique name, such as nightly-report.
cronstringrequiredFive-field cron expression. The shortest interval is one minute.
queuestringrequiredQueue for the created jobs.
taskstringrequiredTask for the created jobs.
timezonestringdefault: UTCIANA time zone, such as America/Chicago.
payloadobjectdefault: {}Copied into every job.
overlapenumdefault: skipskip, queue or allow.
Returns
The new schedule object with next_run_at filled in.
curl https://api.halyard.example/v3/schedules \ -H "Authorization: Bearer hy_test_51Hq8Zx2rTmV9cKpL3d" \ -H "Content-Type: application/json" \ -d '{ "name": "nightly-report", "cron": "0 2 * * *", "timezone": "Europe/Amsterdam", "queue": "reports", "task": "build-daily-report", "payload": { "format": "pdf" } }'import { Halyard } from "@halyard/node"; const halyard = new Halyard(process.env.HALYARD_KEY); const schedule = await halyard.schedules.create({ name: "nightly-report", cron: "0 2 * * *", timezone: "Europe/Amsterdam", queue: "reports", task: "build-daily-report", payload: { format: "pdf" },});import osfrom halyard import Halyard halyard = Halyard(os.environ["HALYARD_KEY"]) schedule = halyard.schedules.create( name="nightly-report", cron="0 2 * * *", timezone="Europe/Amsterdam", queue="reports", task="build-daily-report", payload={"format": "pdf"},){ "id": "sch_2Mf6Xb8Qn4", "object": "schedule", "name": "nightly-report", "cron": "0 2 * * *", "timezone": "Europe/Amsterdam", "queue": "reports", "task": "build-daily-report", "payload": { "format": "pdf" }, "status": "active", "overlap": "skip", "next_run_at": "2026-10-15T00:00:00Z", "last_run_at": null, "last_job": null, "created_at": "2026-10-14T10:05:22Z", "livemode": false}Update a schedule
/v3/schedules/{id}Changes a schedule. Only the fields you send are updated, and next_run_at is recalculated right away.
Path parameters
idstringrequiredThe schedule's ID.
Body parameters
cronstringNew cron expression.
timezonestringNew IANA time zone.
payloadobjectReplaces the payload for future jobs.
overlapenumskip, queue or allow.
statusenumactive or paused. Same as the pause endpoint.
Returns
The updated schedule object.
curl -X PATCH https://api.halyard.example/v3/schedules/sch_2Mf6Xb8Qn4 \ -H "Authorization: Bearer hy_test_51Hq8Zx2rTmV9cKpL3d" \ -H "Content-Type: application/json" \ -d '{ "cron": "30 6 * * 1-5" }'import { Halyard } from "@halyard/node"; const halyard = new Halyard(process.env.HALYARD_KEY); const schedule = await halyard.schedules.update("sch_2Mf6Xb8Qn4", { cron: "30 6 * * 1-5",});import osfrom halyard import Halyard halyard = Halyard(os.environ["HALYARD_KEY"]) schedule = halyard.schedules.update( "sch_2Mf6Xb8Qn4", cron="30 6 * * 1-5",){ "id": "sch_2Mf6Xb8Qn4", "object": "schedule", "name": "nightly-report", "cron": "30 6 * * 1-5", "timezone": "Europe/Amsterdam", "queue": "reports", "task": "build-daily-report", "payload": { "format": "pdf" }, "status": "active", "overlap": "skip", "next_run_at": "2026-10-15T04:30:00Z", "last_run_at": "2026-10-14T00:00:00Z", "last_job": "job_8Vx1Lk5Pq3", "created_at": "2026-09-02T14:20:11Z", "livemode": false}Pause a schedule
/v3/schedules/{id}/pauseStops a schedule from firing. Jobs it already created are not affected. Missed firings are not caught up when you resume.
Path parameters
idstringrequiredThe schedule's ID.
Returns
The schedule object with status set to paused.
curl -X POST https://api.halyard.example/v3/schedules/sch_2Mf6Xb8Qn4/pause \ -H "Authorization: Bearer hy_test_51Hq8Zx2rTmV9cKpL3d"import { Halyard } from "@halyard/node"; const halyard = new Halyard(process.env.HALYARD_KEY); const schedule = await halyard.schedules.pause("sch_2Mf6Xb8Qn4");import osfrom halyard import Halyard halyard = Halyard(os.environ["HALYARD_KEY"]) schedule = halyard.schedules.pause("sch_2Mf6Xb8Qn4"){ "id": "sch_2Mf6Xb8Qn4", "object": "schedule", "name": "nightly-report", "cron": "0 2 * * *", "timezone": "Europe/Amsterdam", "queue": "reports", "task": "build-daily-report", "payload": { "format": "pdf" }, "status": "paused", "overlap": "skip", "next_run_at": null, "last_run_at": "2026-10-14T00:00:00Z", "last_job": "job_8Vx1Lk5Pq3", "created_at": "2026-09-02T14:20:11Z", "livemode": false}Delete a schedule
/v3/schedules/{id}Deletes a schedule permanently. Jobs it created keep running and keep their schedule ID for reference.
Path parameters
idstringrequiredThe schedule's ID.
Returns
An object with the schedule's id and deleted: true.
curl -X DELETE https://api.halyard.example/v3/schedules/sch_2Mf6Xb8Qn4 \ -H "Authorization: Bearer hy_test_51Hq8Zx2rTmV9cKpL3d"import { Halyard } from "@halyard/node"; const halyard = new Halyard(process.env.HALYARD_KEY); const deleted = await halyard.schedules.delete("sch_2Mf6Xb8Qn4");import osfrom halyard import Halyard halyard = Halyard(os.environ["HALYARD_KEY"]) deleted = halyard.schedules.delete("sch_2Mf6Xb8Qn4"){ "id": "sch_2Mf6Xb8Qn4", "object": "schedule", "deleted": true}List schedules
/v3/schedulesLists schedules, sorted by next_run_at so the next one to fire comes first.
Query parameters
statusenumOnly active or only paused schedules.
limitintegerdefault: 20How many objects to return, between 1 and 100.
starting_afterstringA cursor: the ID of the last object on the previous page. The next page starts right after it.
ending_beforestringA cursor for paging backwards: the ID of the first object on the current page.
Returns
A list object with schedule objects in data.
curl -G https://api.halyard.example/v3/schedules \ -H "Authorization: Bearer hy_test_51Hq8Zx2rTmV9cKpL3d" \ -d status=active \ -d limit=2import { Halyard } from "@halyard/node"; const halyard = new Halyard(process.env.HALYARD_KEY); const schedules = await halyard.schedules.list({ status: "active", limit: 2,});import osfrom halyard import Halyard halyard = Halyard(os.environ["HALYARD_KEY"]) schedules = halyard.schedules.list(status="active", limit=2){ "object": "list", "url": "/v3/schedules", "has_more": false, "data": [ { "id": "sch_6Kd1Wq9Lr2", "object": "schedule", "name": "expire-trials", "cron": "*/15 * * * *", "timezone": "UTC", "queue": "billing", "task": "expire-trials", "payload": {}, "status": "active", "overlap": "skip", "next_run_at": "2026-10-14T09:45:00Z", "last_run_at": "2026-10-14T09:30:00Z", "last_job": "job_5Yc7Gm3Ka1", "created_at": "2026-09-02T14:20:11Z", "livemode": false }, { "id": "sch_2Mf6Xb8Qn4", "object": "schedule", "name": "nightly-report", "cron": "0 2 * * *", "timezone": "Europe/Amsterdam", "queue": "reports", "task": "build-daily-report", "payload": { "format": "pdf" }, "status": "active", "overlap": "skip", "next_run_at": "2026-10-15T00:00:00Z", "last_run_at": "2026-10-14T00:00:00Z", "last_job": "job_8Vx1Lk5Pq3", "created_at": "2026-09-02T14:20:11Z", "livemode": false } ]}