跳转到内容
POST AI agent ready /v1/cron/next

Cron Next Runs API - 免费时间表预览

计算 cron 表达式接下来的 N 次出现。 可以选择使用 from 参数指定开始日期。

Parameters

stringrequired

The cron expression.

number

Number of future occurrences to return (1-25).

string

ISO 8601 date to start calculating from. Defaults to now.

Code examples

curl -X POST https://api.botoi.com/v1/cron/next \
  -H "Content-Type: application/json" \
  -d '{"expression":"0 9 * * 1-5","count":3,"from":"2026-03-27T00:00:00Z"}'

When to use this API

在管理面板中确认安排

当用户配置 cron 计划时,向用户显示接下来的 5 个运行时间,以便他们可以在保存之前验证时间。

监控间隙检测

将预期的下次运行时间与实际执行日志进行比较,以检测错过或延迟的 cron 作业。

Frequently asked questions

结果是在哪个时区?
所有结果均采用 UTC 格式,以带 Z 后缀的 ISO 8601 时间戳形式返回。
我可以请求未来发生多少次?
count 参数接受 1 到 25 之间的值。
我可以计算从特定日期开始的运行次数吗?
是的。 在 from 参数中传递 ISO 8601 日期,以从当前日期以外的日期开始计算。
结果采用什么日期格式?
结果是 UTC 格式的 ISO 8601 时间戳,例如 2026-03-27T09:00:00.000Z。

Get your API key

Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.