NewAPIVerve Academy: free courses and certifications anyone can verify.Explore the Academy →

Cron Explainer Template

  • Next.js
  • TypeScript

Type a cron expression and read it in plain English, with the next five times it will run.

A Next.js app that explains cron schedules. Type any 5- or 6-field cron expression, or pick a common one, and get a plain-English sentence, each field labelled, and the next five run times with how far away they are. Use it to check a schedule before you deploy it, or lift the route to describe jobs in your own dashboard.

The cron explainer app running

What it does

Plain English
Turns an expression like 0 9 * * 1-5 into a sentence: at 9:00 AM on Monday through Friday.
Next five runs
Lists when the schedule fires next, in UTC, with how long until each run.
Fields labelled
Shows which part of the expression is the minute, hour, day, month and weekday, including the seconds field.
Shareable links
Open the app with ?expression= in the URL to explain a schedule straight away, handy in docs and code reviews.
Keeps your key private
The browser only talks to your own API route, which checks the field count, holds the key and rate-limits visitors.

How it works

The route: check the field count, answer from the cache, then call Cron Parser.

app/api/explain/route.ts
export async function GET(request: Request) {
  const expression = str(new URL(request.url).searchParams.get('expression'), 120).replace(/\s+/g, ' ');
  if (!expression) return fail('Enter a cron expression, like 0 9 * * 1-5');
  const parts = expression.split(' ').length;
  if (parts < 5 || parts > 6) return fail('A cron expression has 5 fields (or 6 with seconds), separated by spaces');

  const key = `cron:${expression}`;
  const hit = fromCache(key, TTL_MS);
  if (hit) return Response.json(hit);

  const blocked = guard(request);
  if (blocked) return blocked;

  return respond(async () => {
    const data = await callApi('cronparser', { query: { expression } });
    toCache(key, data);
    return data;
  });
}

See the whole file on GitHub →

Deploy it

  1. Get a free API key

    The free plan includes 200 credits a month, no card needed. Create your key.

  2. Deploy it

    Click Deploy to Vercel. Vercel copies the repo to your GitHub account and asks for APIVERVE_API_KEY: paste your key there.

  3. Open your app

    Vercel builds it and gives you a live URL, usually in about a minute. Every push to the repo redeploys it.

Try the Cron Expression Parser API — the call this template makes

Request
GETapi.apiverve.com/v1/cronparser?expression=0%209%20*%20*%201-5
Query parameters
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "expression": "0 9 * * 1-5",
    "isValid": true,
    "format": "5-field",
    "fields": {
      "second": {
        "expression": "0",
        "description": "At 0",
        "values": [
          0
        ]
      },
      "minute": {
        "expression": "0",
        "description": "At 0",
        "values": [
          0
        ]
      },
      "hour": {
        "expression": "9",
        "description": "At 9",
        "values": [
          9
        ]
      },
      "dayOfMonth": {
        "expression": "*",
        "description": "Every",
        "values": [
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20,
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          28,
          29,
          30,
          31
        ]
      },
      "month": {
        "expression": "*",
        "description": "Every",
        "values": [
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12
        ]
      },
      "dayOfWeek": {
        "expression": "1-5",
        "description": "From 1 to 5",
        "values": [
          1,
          2,
          3,
          4,
          5
        ]
      }
    },
    "description": "At 9:00 AM on Monday, Tuesday, Wednesday, Thursday, Friday",
    "frequency": {
      "type": "Daily",
      "interval": "day"
    },
    "nextRuns": [
      "2026-09-21T09:00:00.000Z",
      "2026-09-22T09:00:00.000Z",
      "2026-09-23T09:00:00.000Z",
      "2026-09-24T09:00:00.000Z",
      "2026-09-25T09:00:00.000Z"
    ]
  }
}

Build your own with Cron Expression Parser. Start with 200 free credits. One key unlocks all 300+ APIs.

Explore the catalog

300+ APIs on the same key and the same response shape.

Browse all APIs