List Schedules
GET
List all schedules. You can also paginate the results.
secretKeyheader
AuthorizationBearer <token>Use a named environment API key. It starts with tr_dev_sk_, tr_prod_sk_, tr_stg_sk_, etc.
Create a named API key in the API Keys section of your Trigger.dev project dashboard. Choose the narrowest access preset that supports your integration.
Our TypeScript SDK will default to using the value of the TRIGGER_SECRET_KEY environment variable if it is set. If you are using the SDK in a different environment, you can set the key using the configure function.
import { configure } from "@trigger.dev/sdk";configure({ accessToken: "tr_dev_sk_1234" });page?integerPage number of the schedule listing
perPage?integerNumber of schedules per page
Successful request
application/json- response
data?array<>pagination?import { schedules } from "@trigger.dev/sdk";const allSchedules = await schedules.list();Example Response
{ "data": [ { "id": "sched_1234", "task": "my-scheduled-task", "type": "IMPERATIVE", "active": true, "deduplicationKey": "dedup_key_1234", "externalId": "user_1234", "generator": { "type": "CRON", "expression": "0 0 * * *", "description": "Every day at midnight" }, "timezone": "America/New_York", "nextRun": "2024-04-01T00:00:00Z", "appliedSchedulePolicy": { "minimumWindowSeconds": 3600, "reason": "free_schedule" }, "environments": [ { "id": "string", "type": "string", "userName": "string" } ] } ], "pagination": { "currentPage": 0, "totalPages": 0, "count": 0 }}Was this page helpful?
Last updated
Edit on GitHub