Fundamentals
Development
Deployment
- Environment Variables
- CLI deploy command
- GitHub Actions
- Deployment integrations
Writing tasks
API reference
- Functions
- Objects
- CLI
- Runs API
- Schedules API
Architecture
Open source
Schedules API
List Schedules
List all schedules.
GET
/
api
/
v1
/
schedules
Copy
import { schedules } from "@trigger.dev/sdk/v3";
const allSchedules = await schedules.list();
Copy
{
"data": [
{
"id": "sched_1234",
"task": "my-scheduled-task",
"active": true,
"deduplicationKey": "dedup_key_1234",
"externalId": "user_1234",
"generator": {
"type": "CRON",
"expression": "0 0 * * *",
"description": "Every day at midnight"
},
"nextRun": "2024-04-01T00:00:00Z",
"environments": [
{
"id": "<string>",
"type": "<string>",
"userName": "<string>"
}
]
}
],
"pagination": {
"currentPage": 123,
"totalPages": 123,
"count": 123
}
}
Authorizations
Use your Secret API key in the form 'Bearer <SECRET KEY>' (without the quotation marks)
Query Parameters
Page number of the schedule listing
Number of schedules per page
Response
200
application/json
Successful request
The response is of type object
.
Was this page helpful?
Copy
import { schedules } from "@trigger.dev/sdk/v3";
const allSchedules = await schedules.list();
Copy
{
"data": [
{
"id": "sched_1234",
"task": "my-scheduled-task",
"active": true,
"deduplicationKey": "dedup_key_1234",
"externalId": "user_1234",
"generator": {
"type": "CRON",
"expression": "0 0 * * *",
"description": "Every day at midnight"
},
"nextRun": "2024-04-01T00:00:00Z",
"environments": [
{
"id": "<string>",
"type": "<string>",
"userName": "<string>"
}
]
}
],
"pagination": {
"currentPage": 123,
"totalPages": 123,
"count": 123
}
}
Assistant
Responses are generated using AI and may contain mistakes.