> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List schedules

> 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.

`schedules(projectReference: String!, input: SchedulesInput): ScheduleList!`

Requires project.runs.read.

## Arguments

| Argument | Type | Required |
| - | - | - |
| `projectReference` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | Yes |
| `input` | [`SchedulesInput`](https://veryfront.com/docs/cloud/graphql/types/schedulesinput) | No |

## Input fields

### input

[`SchedulesInput`](https://veryfront.com/docs/cloud/graphql/types/schedulesinput)

| Field | Type | Required | Description |
| - | - | - | - |
| `status` | [`ScheduleStatus`](https://veryfront.com/docs/cloud/graphql/types/schedulestatus) | No | |
| `sourceTriggerId` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No | Only the schedule activated from this source schedule. |
| `sortBy` | [`ScheduleSortBy`](https://veryfront.com/docs/cloud/graphql/types/schedulesortby) | No | Default created\_at; ties break by id ascending. |
| `sortOrder` | [`ScheduleSortOrder`](https://veryfront.com/docs/cloud/graphql/types/schedulesortorder) | No | Default desc. |
| `limit` | [`Int`](https://veryfront.com/docs/cloud/graphql/types/int) | No | Maximum schedules per page, 1 to 200; default 100. |
| `cursor` | [`ID`](https://veryfront.com/docs/cloud/graphql/types/id) | No | The previous page's pageInfo.endCursor. Keep the other fields the same across pages. |

## Response

Returns [`ScheduleList!`](https://veryfront.com/docs/cloud/graphql/types/schedulelist). Open the type for its fields and nested types.

| Field | Type |
| - | - |
| `data` | [`[Schedule!]!`](https://veryfront.com/docs/cloud/graphql/types/schedule) |
| `pageInfo` | [`PageInfo!`](https://veryfront.com/docs/cloud/graphql/types/pageinfo) |

Types marked with `!` cannot be null. Lists use `[Type]` notation. The [type index](https://veryfront.com/docs/cloud/graphql/schema.md) lists all published input and response types.

## Example

```graphql title="query.graphql" theme={null}
query Schedules($projectReference: String!, $input: SchedulesInput) {
  schedules(projectReference: $projectReference, input: $input) {
    data {
      id
      projectId
      name
      status
      createdAt
    }
    pageInfo {
      hasNextPage
      endCursor
      hasPreviousPage
      startCursor
    }
  }
}
```

```json title="variables.json" theme={null}
{
  "projectReference": "example"
}
```

<details>
  <summary>Try this query</summary>

  Calls use `https://api.veryfront.com/graphql`. Replace sample values with resources you can access. See [Authentication](https://veryfront.com/docs/cloud/authentication.md) for credentials and permissions.

  Bearer token or API key

  Stored in this tab's session. Clear credential

  Query

  Variables (JSON)
</details>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.