Cron Expression API
Pricing
from $1.00 / 1,000 api calls
Cron Expression API
Validate cron expressions and compute next run times via a simple HTTP API.
Pricing
from $1.00 / 1,000 api calls
Rating
0.0
(0)
Developer
Fatih Şahinbaş
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
5 days ago
Last modified
Categories
Share
Cron Expression API — Validate, Describe & Calculate Next Run Times
A fast, no-nonsense HTTP API for working with cron expressions. Validate crontab syntax, calculate the next run times, look up previous runs, and turn any cron schedule into a plain-English description — all through simple GET requests.
Stop guessing whether */15 9-17 * * 1-5 is correct or when it fires next. This cron parser API answers instantly, with full timezone support.
What it does
- ✅ Validate cron expressions — catch bad fields, out-of-range values, and wrong field counts with clear per-field error messages.
- ⏭️ Next run times — compute the upcoming N execution times for any cron schedule, in any IANA timezone.
- ⏮️ Previous run times — look back at when a schedule last fired.
- 💬 Human-readable descriptions — convert
0 17 * * 1into "At 17:00, only on Monday". - 🧩 One-call parse — validation, description, and next runs in a single request.
Who it's for
Developers building schedulers, CI/CD pipelines, job queues, dashboards, and admin panels who need to validate crontab input or preview when a cron job will run — without shipping a cron library into every service. Perfect for form validation, "next run" previews in UIs, and documentation tooling.
Supported syntax
- Standard 5-field cron:
minute hour day-of-month month day-of-week - 6-field cron with seconds:
second minute hour day-of-month month day-of-week - Macros:
@yearly@annually@monthly@weekly@daily@hourly@midnight - Ranges, lists, steps:
1-5,1,3,5,*/15,9-17 - Names:
sun,mon,jan,feb, ... - Extensions:
L(last day),W(nearest weekday),#(nth weekday) — e.g.0 0 * * 1#2= second Monday.
Endpoints
All endpoints are GET and return JSON.
| Endpoint | Purpose | Key params |
|---|---|---|
/validate | Check if an expression is valid | expr |
/next | Next N run times | expr, count, tz, base |
/prev | Previous N run times | expr, count, tz, base |
/describe | Plain-English description | expr |
/parse | Validate + describe + next runs in one call | expr, count, tz, base |
Parameters
expr(required) — the cron expression, e.g.*/15 9-17 * * 1-5count— how many run times to return (default5, max100)tz— IANA timezone (defaultUTC), e.g.Europe/Istanbul,America/New_Yorkbase— ISO 8601 datetime to calculate from (default: now)
Example
Request:
GET /parse?expr=0 9 * * 1-5&count=3&tz=Europe/Istanbul
Response:
{"valid": true,"normalized": "0 9 * * 1-5","fields": 5,"description": "At 09:00, Monday through Friday","tz": "Europe/Istanbul","next_runs": ["2026-01-05T09:00:00+03:00","2026-01-06T09:00:00+03:00","2026-01-07T09:00:00+03:00"],"warning": null}
Invalid input returns a helpful error:
GET /validate?expr=60 * * * *
{"valid": false,"normalized": "60 * * * *","fields": null,"errors": ["minute: '60' out of range 0-59"]}
How it works
The API runs in Standby mode — send it HTTP requests directly, no run to start. Under the hood it uses battle-tested cron parsing for accurate scheduling math, adds a strict validation layer for friendly error messages, and computes run times against the timezone you specify. Impossible schedules (like 0 0 30 2 *, February 30th) are detected and flagged rather than looping forever.
Tips
- Encode spaces in the
exprquery string (%20) when testing from the command line. - Use
baseto compute run times from a fixed point instead of "now" — handy for reproducible tests. - Need seconds-level precision? Pass a 6-field expression.
tzaccepts any IANA name; a wrong name returns a clear400error.
Pricing
Pay-per-event: $0.001 per successful API call. Readiness/health checks are never charged. No subscription, no minimums — you pay only for the requests you make.