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

# Testing cron schedules

Validate a cron schedule expression with the [Public API (V2)](/api/v2/overview)
before you configure a cron check-in. The endpoint authenticates with your
personal API token.

## Test a cron expression

<CodeGroup>
  ```shell Endpoint theme={null}
  POST /api/v2/check_ins/test_cron
  ```
</CodeGroup>

### Request body

| Field               | Type   | Required | Description                                                           |
| ------------------- | ------ | -------- | --------------------------------------------------------------------- |
| `cron`              | string | Yes      | Cron expression to test, such as `0 * * * *`.                         |
| `wait_time_minutes` | number | Yes      | Wait time in minutes for the check-in window.                         |
| `timezone`          | string | No       | Timezone for evaluation, such as `Europe/Amsterdam`. Defaults to UTC. |
| `timestamp`         | number | No       | Unix timestamp to evaluate against. Defaults to the current time.     |

<CodeGroup>
  ```json body.json theme={null}
  {
    "cron": "0 2 * * *",
    "wait_time_minutes": 5,
    "timezone": "UTC"
  }
  ```
</CodeGroup>

### Response

Returns `now` (the timestamp used for evaluation), `next_start` (the next
scheduled start), and `next_end` (the next scheduled end, which is the start plus
the wait time). If the expression is invalid, `error` contains the reason and the
schedule fields are absent.
