Skip to main content

Get Next Few Schedules

Endpoint: GET /api/scheduler/nextFewSchedules

Calculates and returns the next few execution times based on a cron expression. This endpoint does not query existing schedules; it computes future execution times for any given cron expression.

Query parameters

ParameterDescriptionTypeRequired/ Optional
cronExpressionThe cron expression of the schedule to calculate execution times of upcoming schedules.stringRequired.
scheduleStartTimeThe start time for the schedule in Unix timestamp format (in milliseconds), based on the local timezone.integer (int64)Optional.
scheduleEndTimeThe end time for the schedule in Unix timestamp format (in milliseconds), based on the local timezone.integer (int64)Optional.
limitThe maximum number of upcoming executions to return. Default is 3, maximum is 5.integer (int32)Optional.

Response

Returns an array of Unix timestamps (in milliseconds) representing the next scheduled execution times of the queried schedule.

Examples

Get the next 3 execution times for a schedule

Request

curl -X 'GET' \
'https://<YOUR-CLUSTER>/api/scheduler/nextFewSchedules?cronExpression=0%200%2012%2031%20JAN%20%3F&limit=3' \
-H 'accept: application/json' \
-H 'X-Authorization: <TOKEN>'

Response

[
1801396800000,
1832932800000,
1864555200000
]