# schedule

```graphql
query Schedule($projectReference: String!, $scheduleId: ID!) {
  schedule(projectReference: $projectReference, scheduleId: $scheduleId) {
    id
    projectId
    name
    status
    target {
      kind
      id
      conversationMode
      conversationId
    }
    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
    integrationRequirements {
      integration
      requiredScopes
    }
    createdAt
    updatedAt
  }
}
```

Read one schedule by its ID to inspect its target, cron expression, runtime target, state and last failure; returns the schedule. Requires project.runs.read.

## Arguments

| Name               | Type    | Required | Description |
| ------------------ | ------- | -------- | ----------- |
| `projectReference` | String! | Yes      |             |
| `scheduleId`       | ID!     | Yes      |             |

## Variables

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

## Responses

| Status | Description                     |
| ------ | ------------------------------- |
| 200    | The Schedule! in data.schedule. |

## 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 Schedule($projectReference: String!, $scheduleId: ID!) {\n  schedule(projectReference: $projectReference, scheduleId: $scheduleId) {\n    id\n    projectId\n    name\n    status\n    target {\n      kind\n      id\n      conversationMode\n      conversationId\n    }\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    integrationRequirements {\n      integration\n      requiredScopes\n    }\n    createdAt\n    updatedAt\n  }\n}",
  "variables": {
    "projectReference": "string",
    "scheduleId": "string"
  }
}'
```

## Example response

```json
{
  "data": {
    "schedule": {
      "id": "string",
      "projectId": "string",
      "name": "string",
      "status": "active",
      "target": {
        "kind": "task",
        "id": "string",
        "conversationMode": "create_new",
        "conversationId": "string"
      },
      "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",
      "integrationRequirements": [
        {
          "integration": "string",
          "requiredScopes": [
            "string"
          ]
        }
      ],
      "createdAt": "2026-01-01T00:00:00Z",
      "updatedAt": "2026-01-01T00:00:00Z"
    }
  }
}
```
