Cron Expression Parser API
Validate a cron expression and get its next run times in any timezone, with a plain-English description. Supports 5, 6 and 7-field cron syntax.
The Cron API validates a cron expression and calculates when it will fire next. You get up to 100 upcoming runs (count, default 5), each as a UTC ISO timestamp and as local time in the timezone you choose (any IANA name such as Asia/Ho_Chi_Minh; default UTC), so daylight-saving changes are handled correctly.
Standard 5-field expressions (minute hour day month weekday) are supported, as well as 6 and 7-field variants with seconds and year, ranges, steps (*/15), lists and names. For 5-field expressions the response includes a short description such as "at 09:00, on weekdays". Use from (an ISO date) to compute runs after a given moment instead of now.
Invalid expressions do not raise an HTTP error: the API answers valid: false with the parser’s error message, which makes it easy to validate user input in a scheduling form.
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
expression | body|query | string | yes | Cron expression (5, 6 or 7 fields), max 200 characters. | |
timezone | body|query | string | no | UTC | IANA timezone used to evaluate the schedule. |
count | body|query | number | no | 5 | Number of next runs, 1–100. |
from | body|query | string | no | ISO date to start from (default: now). |
Example
curl "https://apibox.io.vn/v1/cron?expression=0%209%20*%20*%201-5&timezone=Asia/Ho_Chi_Minh&count=3" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch('https://apibox.io.vn/v1/cron?expression=0%209%20*%20*%201-5&timezone=Asia/Ho_Chi_Minh&count=3', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const data = await res.json();
console.log(data);import requests
res = requests.get(
"https://apibox.io.vn/v1/cron?expression=0%209%20*%20*%201-5&timezone=Asia/Ho_Chi_Minh&count=3",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/cron?expression=0%209%20*%20*%201-5&timezone=Asia/Ho_Chi_Minh&count=3');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"valid": true,
"expression": "0 9 * * 1-5",
"timezone": "Asia/Ho_Chi_Minh",
"next_runs": [
{
"utc": "2026-11-11T02:00:00.000Z",
"local": "2026-11-11, 09:00:00"
},
{
"utc": "2026-11-12T02:00:00.000Z",
"local": "2026-11-12, 09:00:00"
},
{
"utc": "2026-11-13T02:00:00.000Z",
"local": "2026-11-13, 09:00:00"
}
],
"description": "at 09:00, on weekdays"
}
Use cases
- Validate cron schedules entered by users in an admin panel
- Show “next run” times for scheduled jobs in a dashboard
- Check cron triggers for Cloudflare, GitHub Actions or Kubernetes CronJobs
- Convert a schedule to local time before announcing maintenance
FAQ
Which timezone are the next runs computed in?
In the timezone parameter (default UTC). Each run is returned both as a UTC timestamp and as local time in that zone, e.g. 0 9 * * 1-5 in Asia/Ho_Chi_Minh fires at 02:00 UTC.
Does it support seconds?
Yes. 6-field expressions start with a seconds field and 7-field ones end with a year. The English description is only produced for classic 5-field expressions.
What happens with an invalid expression?
You get HTTP 200 with valid: false and an error message explaining the problem, for example that five, six or seven space-separated parts are required.
Related APIs
UUID Generator
Generate up to 1,000 UUID v4, time-ordered UUID v7, ULID, Nano ID or random hex IDs per request. Secure randomness, optional uppercase.
🕒Time & Timezone Converter
Get the current time in any timezone, convert between timezones and Unix timestamps (seconds or ms), with UTC offset and weekday for up to 30 zones.
🎨Color Converter
Convert colours between HEX, RGB, HSL and CMYK, check WCAG contrast ratios and get complementary, triadic, analogous colours and shades in one call.