# Cron API
> A fast, fully-local cron-expression toolkit (UTC): validate 5-field cron expressions with ranges, lists, steps, month and weekday names and the common @aliases (@yearly, @monthly, @weekly, @daily, @hourly); compute the next N run times for a schedule from now or any start date; and describe a schedule in plain English. Every endpoint accepts input via the query string or the request body. Pure server-side compute, no third-party upstream, so responses are instant and always available. Ideal for schedulers and job runners, devops and CI tooling, and dashboards that show the next run time of a task.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/cron-api/..."
```

## Pricing
- **Free** (Free) — 16,000 calls/Mo, 2 req/s
- **Basic** ($3/Mo) — 290,000 calls/Mo, 12 req/s
- **Pro** ($11/Mo) — 1,650,000 calls/Mo, 40 req/s
- **Mega** ($30/Mo) — 8,800,000 calls/Mo, 120 req/s

## Endpoints

### Cron

#### `GET /v1/describe` — Describe a schedule

**Parameters:**
- `expression` (query, required, string) — 5-field cron expression Example: `0 9 * * 1-5`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/cron-api/v1/describe?expression=0+9+%2A+%2A+1-5"
```

**Response:**
```json
{
    "data": {
        "next": "2026-06-01T09:00:00.000Z",
        "expression": "0 9 * * 1-5",
        "description": "At 09:00 on Monday through Friday (UTC)"
    },
    "meta": {
        "timestamp": "2026-05-30T10:10:54.546Z",
        "request_id": "3136eb48-a66c-473d-a16d-b32e60a4da0f"
    },
    "status": "ok",
    "message": "OK",
    "success": true
}
```

#### `GET /v1/next` — Next run times

**Parameters:**
- `expression` (query, required, string) — 5-field cron expression Example: `*/15 * * * *`
- `count` (query, optional, string) — How many 1-50 (default 5) Example: `5`
- `from` (query, optional, string) — Start date (ISO, default now)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/cron-api/v1/next?expression=%2A%2F15+%2A+%2A+%2A+%2A&count=5"
```

**Response:**
```json
{
    "data": {
        "from": "2026-05-30T10:10:54.623Z",
        "next": [
            "2026-05-30T10:15:00.000Z",
            "2026-05-30T10:30:00.000Z",
            "2026-05-30T10:45:00.000Z",
            "2026-05-30T11:00:00.000Z",
            "2026-05-30T11:15:00.000Z"
        ],
        "count": 5,
        "expression": "*/15 * * * *"
    },
    "meta": {
        "timestamp": "2026-05-30T10:10:54.623Z",
        "request_id": "89f7b79c-07e2-4c2b-958c-891fe80bd981"
    },
    "status": "ok",
    "message": "OK",
    "success": true
}
```

#### `GET /v1/validate` — Validate an expression

**Parameters:**
- `expression` (query, required, string) — 5-field cron expression Example: `0 0 1 * *`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/cron-api/v1/validate?expression=0+0+1+%2A+%2A"
```

**Response:**
```json
{
    "data": {
        "valid": true,
        "expression": "0 0 1 * *",
        "normalized": "0 0 1 * *"
    },
    "meta": {
        "timestamp": "2026-05-30T10:10:54.700Z",
        "request_id": "b2a3d9e7-f674-46f0-8238-3e3fb565037b"
    },
    "status": "ok",
    "message": "OK",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/cron-api
OpenAPI spec: https://www.oanor.com/api/cron-api/openapi.json
