Schedule computation operations for CRON expressions with timezone support.
Current phase supports 5-field CRON expressions only. Future phases will add business macros, plain language parsing, and holiday filtering.
Compute next CRON execution time
Computes the next execution time for a given CRON expression with timezone support.
Supported Features:
- 5-field CRON expressions only (minute hour day_of_month month day_of_week)
- IANA timezone support with DST ambiguity policies
- Time-based search horizon (5 years from 'from' time)
Not Implemented (501 responses):
- Plain language input (
plainfield) - Holiday filtering (except
holidays.use='none') - Business macros in this MVP phase
Error Codes:
400 BAD_REQUEST: Malformed JSON, missing required fields, Ajv validation failures422 INVALID_CRON: Invalid CRON expression (seconds field, Quartz tokens like ?, L, W, #)422 INVALID_TIMEZONE: Invalid IANA timezone identifier422 NO_FUTURE_OCCURRENCE: No future execution within search horizon (details.horizonYears=5)422 DST_AMBIGUOUS: Ambiguous time due to DST fall-back with ambiguityPolicy='error'422 DST_NON_EXISTENT: Non-existent time due to DST spring-forward with ambiguityPolicy='error'501 NOT_IMPLEMENTED: Plain language input, holiday filtering, or macros like @yearly, @monthly, @daily provided
Note: Rate limiting and authentication (401/429) are handled by the Zuplo API Gateway. The function does not set rate-limit headers (X-RateLimit-*) in its responses.
Headers
Authorizationstring · requiredThe
Authorizationheader is used to authenticate with the API using your API key. Value is of the formatBearer YOUR_KEY_HERE.
Request Body
cronstring · cron5 · required5-field CRON expression (minute hour day_of_month month day_of_week).
Format:
minute hour day_of_month month day_of_week- minute: 0-59
- hour: 0-23
- day_of_month: 1-31
- month: 1-12
- day_of_week: 0-7 (0 or 7 is Sunday)
Supported operators:
*,-,,,/Not supported: Quartz tokens (?,L,W,#), seconds field (6+ fields)
tzstring · iana-tzIANA timezone identifier for execution time calculation. See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
Default: UTCfromstring · date-time · pattern:.*Z$Starting time for next occurrence calculation in ISO8601 UTC format. Must end with 'Z' suffix. If not provided, defaults to current time.
ambiguityPolicystring · enumPolicy for handling DST ambiguity when local times are non-existent (spring-forward) or ambiguous (fall-back).
first-valid: Use the first valid time (default)second-valid: Use the second valid timeerror: Return error for ambiguous times
Enum values:first-validsecond-validerrorDefault: first-validmacrosbooleanEnable business macros processing. Currently not implemented in MVP. Future phases will support @EOM, @EOQ, @semi-monthly, etc.
Default: trueplainstringPlain language schedule input (e.g., "Every Monday at 9am").
Not implemented in MVP - Sending this field returns 501 NOT_IMPLEMENTED. Will be supported in Phase 6.
holidaysobjectHoliday configuration for filtering execution times. Currently only
use: 'none'is supported.
returnstring · enum · deprecated · requiredDEPRECATED: This parameter is deprecated and ignored. Both nextIso and nextDate are always returned regardless of this parameter's value.
Previously specified which timestamp formats to include in the response:
iso: Only nextIso field (ISO8601 with timezone offset)date: Only nextDate field (calendar date in target timezone)both: Both nextIso and nextDate fields (default)
For backwards compatibility, this field is still accepted but has no effect on the response format.
Enum values:isodatebothDefault: both
Responses
Successfully computed next execution time
nextIsostring · date-time · requiredNext execution time in ISO8601 UTC format. Always returned regardless of deprecated 'return' parameter.
nextDatestring · date · requiredNext execution date in YYYY-MM-DD format in the requested timezone. Always returned regardless of deprecated 'return' parameter.
schedlstring · requiredCanonical SCHEDL (Schedule Language) representation of the schedule. Format: "
tz= " expandedCronstring · requiredNormalized 5-field CRON string with single spaces when input is valid. Null if normalization cannot be produced, with warning added to warnings array.
explanationstring · requiredHuman-readable explanation of the schedule using 24-hour format. Format: "At HH:mm on
" warningsstring[] · requiredArray of human-readable warning codes about schedule processing. May include DST adjustments, deprecated parameter warnings, normalization fallback, etc.