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
| Parameter | Description | Type | Required/ Optional |
|---|---|---|---|
| cronExpression | The cron expression of the schedule to calculate execution times of upcoming schedules. | string | Required. |
| scheduleStartTime | The start time for the schedule in Unix timestamp format (in milliseconds), based on the local timezone. | integer (int64) | Optional. |
| scheduleEndTime | The end time for the schedule in Unix timestamp format (in milliseconds), based on the local timezone. | integer (int64) | Optional. |
| limit | The 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
]