- Description: Retrieve a list of all scheduled tasks.
- Endpoint:
GET /scheduler/task
- Sample Output
[
{
"name": "task-1iqz98gc7tg2k-137337807472199",
"group": "38befbfb-20a3-4bcd-91e1-a2c7240adfa0",
"consumer": "EmailTaskConsumer",
"nextFireTime": "2024-06-11T11:53:50",
"state": "NORMAL",
"interval": "1d",
"runs": 17,
"dataMap": [
"CC: [[email protected]]",
"FIELDS: {sender=Sender Name, content=Some dynamic content! Can be a text, a url, etc.}",
"RECIPIENT_LOCALE: en",
"RECIPIENT_NAME: person_name_1",
"RECIPIENT_TARGET: [email protected]",
"SUBJECT: Something",
"TASK_ID: 38befbfb-20a3-4bcd-91e1-a2c7240adfa0",
"TEMPLATE: simple"
]
}
]
- Description: Retrieve a list of task groups.
- Endpoint:
GET /scheduler/task/group
- Sample Output
[
"38befbfb-20a3-4bcd-91e1-a2c7240adfa0",
"72512d82-622f-4c3f-9355-990f938c12f7"
]
- Endpoint:
POST /scheduler/task/{taskId}/{taskGroup}/pause
- Endpoint:
POST /scheduler/task/{taskId}/{taskGroup}/resume
Sample Output
{
"totalAffected": 0,
"alreadyInState": 0,
"totalTasks": 2,
"state": "NORMAL"
}
- Endpoint:
DELETE /scheduler/task
- Endpoint:
DELETE /scheduler/task/{taskId}/{taskGroup}
- Output: Total number of tasks deleted.
- Endpoint:
POST /scheduler/pause
- Endpoint:
POST /scheduler/resume
Sample Output
{
"totalAffected": 0,
"alreadyInState": 0,
"totalTasks": 2,
"state": "RUNNING"
}
- Endpoint:
POST /scheduler/state
- Output:
RUNNING
,PAUSED
,STOPPED
- Endpoint:
POST /scheduler/restart
Optionally, can specify a boolean parameter to indicate whether actively executing tasks should be interrupted.
The default value is false
, meaning the scheduler will await for the executing tasks to finish before restarting.