ForHosting KIT · Developer Utilities

See the next cron runs

Knowing what a cron expression means is only half the question; knowing exactly when it will fire next, and after that, is what actually lets you trust it. This cron next run API takes any cron expression and returns the next N execution timestamps, turning a schedule you're about to deploy into one you can verify first.

● StableFree · in your browser
Use it from WebAPIEmailApp soonTelegram soon

Runs in your browser. Free, unlimited — your data never leaves this page.

The moment before deploying a schedule that matters

There is a specific kind of anxiety that comes with pushing a new cron schedule to production: is 0 0 1 * * really going to run at midnight on the first of the month, or did a typo just create a job that fires every minute? Platform engineers rolling out a new scheduled job, QA teams validating a scheduling feature before release, and anyone debugging why a task ran twice yesterday all need the same thing, a concrete list of timestamps rather than a mental simulation of the syntax. Getting a wrong expression into production quietly, one that fires too often or not at all, is the kind of mistake that's cheap to catch beforehand and expensive to catch in an incident review.

What the request returns

POST /dev/cron-next accepts a cron expression, a starting reference time, and the number of upcoming occurrences to compute, then returns that exact list of future execution timestamps. The task queues asynchronously and hands back a task_id immediately; the list of run times is delivered a short while later via signed webhook or a signed link valid for 24 hours, ready to render in a preview panel or compare against expected values in a test.

Why computing 'next' isn't trivial

Calculating the next occurrence of a cron expression sounds like simple arithmetic until you factor in month-end edge cases, like a schedule set for the 31st landing in a 30-day month, day-of-week and day-of-month fields interacting in ways the cron standard leaves ambiguous, and step values combined with ranges. The format itself dates back to 1970s Unix scheduling, long before anyone anticipated it being parsed and previewed by web APIs, which is exactly why a dedicated, well-tested next-run calculation is worth pulling out of application code rather than reimplementing it inline.

Fitting it into a testing or deployment workflow

This endpoint is naturally suited to CI checks, computing the next few runs of every scheduled job in a deployment and flagging any that don't match the intended frequency before the change ships, and to admin UIs that preview 'this job will next run at these five times' the moment someone types an expression. It pairs directly with a cron explanation endpoint: show what the schedule means in words, then show exactly when it fires. At $0.002 per request, validating every scheduled job in a deployment pipeline stays inexpensive.

Access and current status

Calling the endpoint requires prepaid balance; without one, requests return HTTP 402 rather than a guessed or incomplete list. Pricing is a flat $0.002 per request regardless of how many occurrences are requested. The endpoint is live now, and expressions submitted for calculation are discarded after the delivery window, never used for training.

Pre-deployment schedule validation

Preview the next ten run times for a new cron job before merging it, catching a typo that would fire the job every minute instead of daily.

Scheduling UI previews

Show a user the next five execution times as they type a cron expression into a form, before they save the schedule.

Automated testing of scheduled features

Assert in a test suite that a given cron expression produces the exact expected sequence of execution timestamps.

Incident investigation

Check whether a job's expression would have run twice within a short window, to confirm or rule out a scheduling bug.

How does this cron next run API work?

Send a cron expression, a starting time and the number of occurrences to POST /dev/cron-next, and it returns that many future execution timestamps via webhook or a signed link.

Can I choose how many upcoming runs to calculate?

Yes, you specify the number of future occurrences you want, and the response returns exactly that many timestamps in order.

Is there a free tier for this API?

The tool above runs free in your browser. The API is paid — each call draws from your prepaid ForHosting KIT balance: top up from $10.00 (it never expires), pay each request's published price, and a call with no balance returns HTTP 402. No subscription, no tokens, and a failed task is never charged.

How much does the cron next run API cost?

It costs a flat $0.002 per request, regardless of how many upcoming occurrences you request.

Does it handle edge cases like month-end schedules?

Yes, it accounts for cron's month-end and day-of-week edge cases when computing the next valid execution times.

Is the cron next run API live now?

Yes, it is live and accepting requests.

Does it also explain what the expression means in plain language?

This endpoint focuses on computing exact future run times; a plain-language explanation is available through a separate cron endpoint.

Can I validate many cron expressions at once?

Submit one request per expression; each is queued and priced independently, which suits validating every scheduled job in a deployment.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/dev/cron-next

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.

curl -X POST https://api.kit.forhosting.com/dev/cron-next \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"items":["valor-1","valor-2"]}'
{
  "items": [
    "valor-1",
    "valor-2"
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "dev.cron_next",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →