---
title: Advanced Schedule Cron API
slug: cron-next-run-calculator
url: https://apyhub.com/creightonnick0/service/cron-next-run-calculator
provider: nick creighton
categories: [Developer Tools, Standard Data]
tags: [cron, schedule-calculation, job-scheduling, time-utils, developer-tools]
auth: api_key
version: 1.0.0
service_type: sync
endpoints: 1
atoms: 10
mcp: true
---

# Advanced Schedule Cron API

Compute upcoming fire times for a 5-field cron expression. Returns next_runs, a count, the timezone, and the reference time used, all in UTC.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/creightonnick0/cron-next-run-calculator` | What it does Computes the next N UTC fire times for a cron expression. You provide a 5-field cron e… | 10 |

## Endpoint reference

### Compute the next N fire times of a cron expression (UTC).

`POST https://api.eu.apyhub.com/creightonnick0/cron-next-run-calculator` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `count` | body | integer | no | How many upcoming run times to return (1-50, default 5) Example: `5`. |
| `from_time` | body | integer | no | Unix seconds to compute from (defaults to a fixed reference) Example: `1700000000`. |
| `expression` | body | string | yes | A 5-field cron expression (min hour dom month dow) Example: `0 9 * * 1-5`. |

#### Quickstart

Calculate the next cron run times from a cron expression.

```bash
curl -X POST "https://api.eu.apyhub.com/creightonnick0/cron-next-run-calculator" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"expression":"0 9 * * 1-5"}'
```

#### What you'll get back

Returns a JSON object with these top-level fields: `from` (string), `note` (string), `count` (integer), `timezone` (string), `next_runs` (array of strings), and `expression` (string).

```json
{
  "from": "2023-11-14T22:13:20Z",
  "note": "Next scheduled run times",
  "count": 5,
  "timezone": "UTC",
  "next_runs": [
    "2023-11-15T09:00:00Z",
    "2023-11-16T09:00:00Z"
  ],
  "expression": "0 9 * * 1-5"
}
```

## About

## What it does
Cron Schedule Calculator computes the next fire times for a 5-field cron expression in UTC. Send an `expression`, and optionally a `count` and `from_time`, then get back upcoming run timestamps you can use for schedulers, job queues, and previewing recurring tasks.

Use it when you need to confirm that a cron string does what you expect before shipping it into production. `count` controls how many upcoming runs you want returned, up to 50, and `from_time` lets you calculate from a specific Unix second instead of the default reference point.

The response includes the original `expression`, the `count` used, the `timezone`, a `from` value, an optional `note`, and a `next_runs` array. That makes it straightforward to show upcoming executions in admin tools, validate user-entered schedules, or debug why a task is firing at a certain time.

If your application accepts cron syntax from users or stores scheduled jobs internally, Cron Schedule Calculator gives you a simple way to turn that expression into concrete upcoming run times without guessing how the schedule will resolve.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/creightonnick0/service/cron-next-run-calculator
