Delx
Home / Tools / Cron Expression Explainer

Cron Expression Explainer

Paste any cron expression and get a plain-English explanation instantly. Supports standard 5-field and extended 6-field syntax, plus shorthand keywords like @hourly. Free API for AI agents and developers.

What Is a Cron Expression?

A cron expression is a string of five (or six) fields separated by spaces that defines a recurring schedule. Originally from Unix crontab, this syntax is now used everywhere: CI/CD pipelines, cloud schedulers, Kubernetes CronJobs, and agent heartbeat intervals. Each field constrains when the job runs.

How to Use the Explainer

Send a POST request with the cron expression. The API returns the plain-English explanation, next run times, and field breakdown.

REST API (curl)

curl -X POST https://api.delx.ai/api/v1/utils/cron-explain \
  -H "Content-Type: application/json" \
  -d '{"expression": "*/5 * * * *"}'

# Response:
# {
#   "expression": "*/5 * * * *",
#   "explanation": "Every 5 minutes",
#   "fields": {
#     "minute": "*/5 (every 5th minute)",
#     "hour": "* (every hour)",
#     "day_of_month": "* (every day)",
#     "month": "* (every month)",
#     "day_of_week": "* (every weekday)"
#   },
#   "next_runs": [
#     "2026-03-14T12:05:00Z",
#     "2026-03-14T12:10:00Z",
#     "2026-03-14T12:15:00Z"
#   ]
# }

Common Cron Patterns

ExpressionSchedule
*/5 * * * *Every 5 minutes
0 * * * *Every hour (at minute 0)
0 0 * * *Daily at midnight UTC
0 9 * * 1-5Weekdays at 9:00 AM UTC
0 0 * * 0Weekly on Sunday at midnight
0 0 1 * *Monthly on the 1st at midnight
*/30 * * * *Every 30 minutes

Understanding Each Field

PositionFieldAllowed Values
1Minute0-59
2Hour0-23
3Day of month1-31
4Month1-12 (or JAN-DEC)
5Day of week0-7 (0 and 7 = Sunday, or SUN-SAT)

Special Characters

CharacterMeaningExample
*Any value* in hour = every hour
/Step interval*/15 = every 15 units
-Range1-5 = Monday to Friday
,List1,15 = 1st and 15th

Agent Use Case: Scheduling Heartbeats with Cron

AI agents use cron expressions to schedule recurring tasks: heartbeat pings, data pipeline runs, report generation, and health checks. Following OpenClaw best practices, agents should validate their cron schedules before registration. A misconfigured expression (e.g. * * * * * running every minute instead of every hour) can cause rate-limit bans or excessive resource usage.

# Validate before deploying a heartbeat schedule
curl -X POST https://api.delx.ai/api/v1/utils/cron-explain \
  -H "Content-Type: application/json" \
  -d '{"expression": "*/3 * * * *"}'
# => "Every 3 minutes" — good for fast_monitor
# => next_runs shows the exact upcoming trigger times

FAQ

What is the difference between 5-field and 6-field cron?

Standard (5-field) cron uses: minute, hour, day-of-month, month, day-of-week. Extended (6-field) cron adds a leading seconds field. This explainer auto-detects which format you are using based on the number of fields.

Can I use this to validate cron expressions?

Yes. If the expression is invalid, the API returns a clear error message explaining which field is wrong and what values are allowed. This makes it useful as both a validator and an explainer.

Does this support non-standard keywords like @hourly?

Yes. The explainer recognizes shorthand keywords including @yearly, @annually, @monthly, @weekly, @daily, @midnight, @hourly, and @reboot. Each is expanded to its equivalent 5-field expression in the response.

Related Articles