Interface SchedulerResource
@Path("scheduler")
public interface SchedulerResource
Resource for managing the scheduler
-
Method Summary
Modifier and TypeMethodDescriptioncreateSchedule
(ScheduleModel schedule) Create a new SchedulecreateTask
(TaskModel task) Create a new taskdeleteSchedule
(String scheduleId) Delete a scheduledeleteTask
(String taskId) Delete a taskexecuteSchedule
(String scheduleId) Execute the specified schedule now.getExecution
(String executionId) Load an executiongetSchedule
(String scheduleId) Load a scheduleLoad a taskjobs
(FilterParameterBean filter, SortParameterBean sorting, PagingParameterBean paging, SchedulerJobFilterParameterBean jobFilter) List scheduler jobslistExecutions
(String scheduleId, FilterParameterBean filter, SortParameterBean sorting, PagingParameterBean paging, ExecutionFilterParameterBean executionFilterParameterBean, EmbedParameterBean embed) List all executions of the given schedule which match the filters.
The result can be filtered byid
scheduleId
log
and sorted byid
startTime
endTime
duration
result
listSchedules
(FilterParameterBean filter, SortParameterBean sorting, PagingParameterBean paging, PermsParameterBean perms, EmbedParameterBean embed) List scheduler schedules.
The result can be filtered byid
name
description
taskId
and sorted byid
name
description
taskId
cdate
edate
listTasks
(FilterParameterBean filter, SortParameterBean sorting, PagingParameterBean paging, PermsParameterBean perms) List scheduler tasks.
The result can be filtered byid
name
description
command
and sorted byid
name
description
command
cdate
edate
resume()
Resume the schedulerstatus
(boolean fixExecutor) Get the scheduler status and optionally restart the scheduler executor if it is not running.suspend
(SuspendRequest request) Suspend the schedulerupdateSchedule
(String scheduleId, ScheduleModel schedule) Update a scheduleupdateTask
(String taskId, TaskModel task) Update a task
-
Method Details
-
status
@GET @Path("/status") SchedulerStatusResponse status(@QueryParam("fixExecutor") boolean fixExecutor) throws Exception Get the scheduler status and optionally restart the scheduler executor if it is not running.- Parameters:
fixExecutor
- Whether to restart the scheduler executor if it is not running currently.- Returns:
- status
- Throws:
Exception
-
suspend
Suspend the scheduler- Parameters:
request
- suspend request- Returns:
- status
- Throws:
Exception
-
resume
Resume the scheduler- Returns:
- status
- Throws:
Exception
-
jobs
@GET @Path("/jobs") JobsResponse jobs(@BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam SchedulerJobFilterParameterBean jobFilter) throws Exception List scheduler jobs- Parameters:
filter
- filter parameter beansorting
- sorting parameter beanpaging
- paging parameter beanjobFilter
- job filter parameter bean- Returns:
- list of jobs
- Throws:
Exception
-
listTasks
@GET @Path("/task") TaskListResponse listTasks(@BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam PermsParameterBean perms) throws Exception List scheduler tasks.
The result can be filtered byid
name
description
command
id
name
description
command
cdate
edate
- Parameters:
filter
- filter parameter beansorting
- sorting parameter beanpaging
- paging parameter beanperms
- permissions parameter bean- Returns:
- response containing a list of tasks
- Throws:
Exception
-
createTask
Create a new task- Parameters:
task
- task- Returns:
- response containing the created task
- Throws:
Exception
-
getTask
Load a task- Parameters:
taskId
- task ID- Returns:
- response containing the task
- Throws:
Exception
-
updateTask
@PUT @Path("/task/{id}") TaskResponse updateTask(@PathParam("id") String taskId, TaskModel task) throws Exception Update a task- Parameters:
taskId
- task IDtask
- task data to update- Returns:
- updated task
- Throws:
Exception
-
deleteTask
@DELETE @Path("/task/{id}") GenericResponse deleteTask(@PathParam("id") String taskId) throws Exception Delete a task- Parameters:
taskId
- task ID- Returns:
- response
- Throws:
Exception
-
listSchedules
@GET @Path("/schedule") ScheduleListResponse listSchedules(@BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam PermsParameterBean perms, @BeanParam EmbedParameterBean embed) throws Exception List scheduler schedules.
The result can be filtered byid
name
description
taskId
id
name
description
taskId
cdate
edate
- Parameters:
filter
- filter parameter beansorting
- sorting parameter beanpaging
- paging parameter beanperms
- permissions parameter beanembed
- optionally embed the referenced object (task)- Returns:
- response containing a list of schedules
- Throws:
Exception
-
createSchedule
Create a new Schedule- Parameters:
schedule
- schedule- Returns:
- response containing the created schedule
- Throws:
Exception
-
getSchedule
@GET @Path("/schedule/{id}") ScheduleResponse getSchedule(@PathParam("id") String scheduleId) throws Exception Load a schedule- Parameters:
scheduleId
- schedule ID- Returns:
- response containing the schedule
- Throws:
Exception
-
updateSchedule
@PUT @Path("/schedule/{id}") ScheduleResponse updateSchedule(@PathParam("id") String scheduleId, ScheduleModel schedule) throws Exception Update a schedule- Parameters:
scheduleId
- schedule IDschedule
- schedule to update- Returns:
- updated task
- Throws:
Exception
-
deleteSchedule
@DELETE @Path("/schedule/{id}") GenericResponse deleteSchedule(@PathParam("id") String scheduleId) throws Exception Delete a schedule- Parameters:
scheduleId
- schedule ID- Returns:
- response
- Throws:
Exception
-
executeSchedule
@POST @Path("/schedule/{id}/execute") GenericResponse executeSchedule(@PathParam("id") String scheduleId) throws Exception Execute the specified schedule now.There is no check if the schedule schould be executed, besides a check if it is active.
- Parameters:
scheduleId
- The schedule to execute- Returns:
- response
- Throws:
Exception
-
listExecutions
@GET @Path("/schedule/{id}/execution") ExecutionListResponse listExecutions(@PathParam("id") String scheduleId, @BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam ExecutionFilterParameterBean executionFilterParameterBean, @BeanParam EmbedParameterBean embed) throws Exception List all executions of the given schedule which match the filters.
The result can be filtered byid
scheduleId
log
id
startTime
endTime
duration
result
- Parameters:
scheduleId
- schedule IDfilter
- filter parameter beansorting
- sorting parameter beanpaging
- paging parameter beanexecutionFilterParameterBean
- execution specific filter parameter beanembed
- optionally embed the referenced object (schedule)- Returns:
- Response containing the list of executions
- Throws:
Exception
-
getExecution
@GET @Path("/execution/{id}") ExecutionResponse getExecution(@PathParam("id") String executionId) throws Exception Load an execution- Parameters:
executionId
- execution ID- Returns:
- response containing the execution
- Throws:
Exception
-