Interface SchedulerResource
-
@Path("scheduler") public interface SchedulerResource
Resource for managing the scheduler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ScheduleResponse
createSchedule(ScheduleModel schedule)
Create a new ScheduleTaskResponse
createTask(TaskModel task)
Create a new taskGenericResponse
deleteSchedule(String scheduleId)
Delete a scheduleGenericResponse
deleteTask(String taskId)
Delete a taskGenericResponse
executeSchedule(String scheduleId)
Execute the specified schedule now.ExecutionResponse
getExecution(String executionId)
Load an executionScheduleResponse
getSchedule(String scheduleId)
Load a scheduleTaskResponse
getTask(String taskId)
Load a taskJobsResponse
jobs(FilterParameterBean filter, SortParameterBean sorting, PagingParameterBean paging, SchedulerJobFilterParameterBean jobFilter)
List scheduler jobsExecutionListResponse
listExecutions(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
ScheduleListResponse
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
TaskListResponse
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
SchedulerStatusResponse
resume()
Resume the schedulerSchedulerStatusResponse
status(boolean fixExecutor)
Get the scheduler status and optionally restart the scheduler executor if it is not running.SchedulerStatusResponse
suspend(SuspendRequest request)
Suspend the schedulerScheduleResponse
updateSchedule(String scheduleId, ScheduleModel schedule)
Update a scheduleTaskResponse
updateTask(String taskId, TaskModel task)
Update a task
-
-
-
Method Detail
-
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
@PUT @Path("/suspend") SchedulerStatusResponse suspend(SuspendRequest request) throws Exception
Suspend the scheduler- Parameters:
request
- suspend request- Returns:
- status
- Throws:
Exception
-
resume
@PUT @Path("/resume") SchedulerStatusResponse resume() throws Exception
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
@POST @Path("/task") TaskResponse createTask(TaskModel task) throws Exception
Create a new task- Parameters:
task
- task- Returns:
- response containing the created task
- Throws:
Exception
-
getTask
@GET @Path("/task/{id}") TaskResponse getTask(@PathParam("id") String taskId) throws Exception
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
@POST @Path("/schedule") ScheduleResponse createSchedule(ScheduleModel schedule) throws Exception
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
-
-