# schedules

```graphql
query Schedules($projectReference: String!) {
  schedules(projectReference: $projectReference) {
    data {
      id
      projectId
      name
      status
      schedule
      timezone
      runtimeTargetKind
      runtimeTargetEnvironmentId
      runtimeTargetBranchId
      config
      timeoutSeconds
      backoffLimit
      concurrencyPolicy
      definitionSource
      sourceTriggerId
      sourcePath
      sourceHash
      lastScheduledAt
      lastSuccessfulAt
      health
      maxRuns
      runCount
      completedAt
      pausedReason
      pausedAt
      lastFailureAt
      lastFailureCode
      lastFailureMessage
      lastFailureRunId
      createdBy
      createdAt
      updatedAt
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}
```

List the schedules stored for a project, newest first, to find a schedule or check its state and last runs; returns one page of schedules. Requires project.runs.read.

## Arguments

| Name                    | Type              | Required | Description                                                                          |
| ----------------------- | ----------------- | -------- | ------------------------------------------------------------------------------------ |
| `projectReference`      | String!           | Yes      |                                                                                      |
| `input`                 | SchedulesInput    |          |                                                                                      |
| `input.status`          | ScheduleStatus    |          | One of `active`, `paused`, `deleting`.                                               |
| `input.sourceTriggerId` | String            |          | Only the schedule activated from this source schedule.                               |
| `input.sortBy`          | ScheduleSortBy    |          | Default created\_at; ties break by id ascending. One of `created_at`, `name`.        |
| `input.sortOrder`       | ScheduleSortOrder |          | Default desc. One of `asc`, `desc`.                                                  |
| `input.limit`           | Int               |          | Maximum schedules per page, 1 to 200; default 100.                                   |
| `input.cursor`          | ID                |          | The previous page's pageInfo.endCursor. Keep the other fields the same across pages. |

## Variables

```json
{
  "projectReference": "string"
}
```

## Responses

| Status | Description                          |
| ------ | ------------------------------------ |
| 200    | The ScheduleList! in data.schedules. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query Schedules($projectReference: String!) {\n  schedules(projectReference: $projectReference) {\n    data {\n      id\n      projectId\n      name\n      status\n      schedule\n      timezone\n      runtimeTargetKind\n      runtimeTargetEnvironmentId\n      runtimeTargetBranchId\n      config\n      timeoutSeconds\n      backoffLimit\n      concurrencyPolicy\n      definitionSource\n      sourceTriggerId\n      sourcePath\n      sourceHash\n      lastScheduledAt\n      lastSuccessfulAt\n      health\n      maxRuns\n      runCount\n      completedAt\n      pausedReason\n      pausedAt\n      lastFailureAt\n      lastFailureCode\n      lastFailureMessage\n      lastFailureRunId\n      createdBy\n      createdAt\n      updatedAt\n    }\n    pageInfo {\n      hasNextPage\n      hasPreviousPage\n      startCursor\n      endCursor\n    }\n  }\n}",
  "variables": {
    "projectReference": "string"
  }
}'
```

## Example response

```json
{
  "data": {
    "schedules": {
      "data": [
        {
          "id": "string",
          "projectId": "string",
          "name": "string",
          "status": "active",
          "schedule": "string",
          "timezone": "string",
          "runtimeTargetKind": "main_branch",
          "runtimeTargetEnvironmentId": "string",
          "runtimeTargetBranchId": "string",
          "config": {},
          "timeoutSeconds": 0,
          "backoffLimit": 0,
          "concurrencyPolicy": "allow",
          "definitionSource": "manual",
          "sourceTriggerId": "string",
          "sourcePath": "string",
          "sourceHash": "string",
          "lastScheduledAt": "2026-01-01T00:00:00Z",
          "lastSuccessfulAt": "2026-01-01T00:00:00Z",
          "health": {},
          "maxRuns": 0,
          "runCount": 0,
          "completedAt": "2026-01-01T00:00:00Z",
          "pausedReason": "string",
          "pausedAt": "2026-01-01T00:00:00Z",
          "lastFailureAt": "2026-01-01T00:00:00Z",
          "lastFailureCode": "string",
          "lastFailureMessage": "string",
          "lastFailureRunId": "string",
          "createdBy": "string",
          "createdAt": "2026-01-01T00:00:00Z",
          "updatedAt": "2026-01-01T00:00:00Z"
        }
      ],
      "pageInfo": {
        "hasNextPage": false,
        "hasPreviousPage": false,
        "startCursor": "string",
        "endCursor": "string"
      }
    }
  }
}
```
