Overview
Returns a paginated list of all schedules — both DECLARATIVE schedules (defined in code with the cron option on schedules.task) and IMPERATIVE schedules (created via the dashboard or schedules.create()).
Authentication with a secret key is required.
Endpoint
GET https://api.trigger.dev/api/v1/schedules
Query parameters
Page number (1-based). Defaults to 1.
Number of schedules per page. Defaults to 20.
Response
Array of schedule objects. Show Schedule object fields
Schedule ID, prefixed with sched_.
The task identifier this schedule triggers.
DECLARATIVE or IMPERATIVE.
Whether the schedule is currently active.
Deduplication key, if set.
External ID, if set (e.g. a user or org ID).
CRON generator info. The CRON expression, e.g. 0 0 * * *.
Human-readable description, e.g. Every day at midnight.
IANA timezone for the schedule, e.g. America/New_York. Defaults to UTC.
ISO 8601 timestamp of the next scheduled run.
Environments this schedule is active in.
Total number of schedules.
Examples
SDK
SDK — with pagination
cURL
import { schedules } from "@trigger.dev/sdk" ;
const result = await schedules . list ();
for ( const schedule of result . data ) {
console . log (
schedule . id ,
schedule . task ,
schedule . generator . expression ,
schedule . active
);
}
Response example
{
"data" : [
{
"id" : "sched_1234" ,
"task" : "my-scheduled-task" ,
"type" : "IMPERATIVE" ,
"active" : true ,
"deduplicationKey" : "daily-report" ,
"externalId" : "user_5678" ,
"generator" : {
"type" : "CRON" ,
"expression" : "0 9 * * 1-5" ,
"description" : "Every weekday at 9am"
},
"timezone" : "America/New_York" ,
"nextRun" : "2024-04-02T13:00:00Z" ,
"environments" : [
{ "id" : "cl1234" , "type" : "PRODUCTION" }
]
}
],
"pagination" : {
"currentPage" : 1 ,
"totalPages" : 3 ,
"count" : 57
}
}