@Path(value="scheduler")
public interface SchedulerResource
Modifier and Type | Method and Description |
---|---|
ScheduleResponse |
createSchedule(ScheduleModel schedule)
Create a new Schedule
|
TaskResponse |
createTask(TaskModel task)
Create a new task
|
GenericResponse |
deleteSchedule(String scheduleId)
Delete a schedule
|
GenericResponse |
deleteTask(String taskId)
Delete a task
|
GenericResponse |
executeSchedule(String scheduleId)
Execute the specified schedule now.
|
ExecutionResponse |
getExecution(String executionId)
Load an execution
|
ScheduleResponse |
getSchedule(String scheduleId)
Load a schedule
|
TaskResponse |
getTask(String taskId)
Load a task
|
JobsResponse |
jobs(FilterParameterBean filter,
SortParameterBean sorting,
PagingParameterBean paging,
SchedulerJobFilterParameterBean jobFilter)
List scheduler jobs
|
ExecutionListResponse |
listExecutions(String scheduleId,
FilterParameterBean filter,
SortParameterBean sorting,
PagingParameterBean paging,
ExecutionFilterParameterBean executionFilterParameterBean)
List all executions of the given schedule which match the filters.
The result can be filtered by id
scheduleId
log
and sorted by
id
startTime
endTime
duration
result
|
ScheduleListResponse |
listSchedules(FilterParameterBean filter,
SortParameterBean sorting,
PagingParameterBean paging,
PermsParameterBean perms)
List scheduler schedules.
The result can be filtered by id
name
description
taskId
and sorted by
id
name
description
taskId
cdate
edate
|
TaskListResponse |
listTasks(FilterParameterBean filter,
SortParameterBean sorting,
PagingParameterBean paging,
PermsParameterBean perms)
List scheduler tasks.
The result can be filtered by id
name
description
command
and sorted by
id
name
description
command
cdate
edate
|
SchedulerStatusResponse |
resume()
Resume the scheduler
|
SchedulerStatusResponse |
status(boolean fixExecutor)
Get the scheduler status and optionally restart the scheduler executor if
it is not running.
|
SchedulerStatusResponse |
suspend(SuspendRequest request)
Suspend the scheduler
|
ScheduleResponse |
updateSchedule(String scheduleId,
ScheduleModel schedule)
Update a schedule
|
TaskResponse |
updateTask(String taskId,
TaskModel task)
Update a task
|
@GET @Path(value="/status") SchedulerStatusResponse status(@QueryParam(value="fixExecutor") boolean fixExecutor) throws Exception
fixExecutor
- Whether to restart the scheduler executor if it is not
running currently.Exception
@PUT @Path(value="/suspend") SchedulerStatusResponse suspend(SuspendRequest request) throws Exception
request
- suspend requestException
@PUT @Path(value="/resume") SchedulerStatusResponse resume() throws Exception
Exception
@GET @Path(value="/jobs") JobsResponse jobs(@BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam SchedulerJobFilterParameterBean jobFilter) throws Exception
filter
- filter parameter beansorting
- sorting parameter beanpaging
- paging parameter beanjobFilter
- job filter parameter beanException
@GET @Path(value="/task") TaskListResponse listTasks(@BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam PermsParameterBean perms) throws Exception
id
name
description
command
id
name
description
command
cdate
edate
filter
- filter parameter beansorting
- sorting parameter beanpaging
- paging parameter beanperms
- permissions parameter beanException
@POST @Path(value="/task") TaskResponse createTask(TaskModel task) throws Exception
task
- taskException
@GET @Path(value="/task/{id}") TaskResponse getTask(@PathParam(value="id") String taskId) throws Exception
taskId
- task IDException
@PUT @Path(value="/task/{id}") TaskResponse updateTask(@PathParam(value="id") String taskId, TaskModel task) throws Exception
taskId
- task IDtask
- task data to updateException
@DELETE @Path(value="/task/{id}") GenericResponse deleteTask(@PathParam(value="id") String taskId) throws Exception
taskId
- task IDException
@GET @Path(value="/schedule") ScheduleListResponse listSchedules(@BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam PermsParameterBean perms) throws Exception
id
name
description
taskId
id
name
description
taskId
cdate
edate
filter
- filter parameter beansorting
- sorting parameter beanpaging
- paging parameter beanperms
- permissions parameter beanException
@POST @Path(value="/schedule") ScheduleResponse createSchedule(ScheduleModel schedule) throws Exception
schedule
- scheduleException
@GET @Path(value="/schedule/{id}") ScheduleResponse getSchedule(@PathParam(value="id") String scheduleId) throws Exception
scheduleId
- schedule IDException
@PUT @Path(value="/schedule/{id}") ScheduleResponse updateSchedule(@PathParam(value="id") String scheduleId, ScheduleModel schedule) throws Exception
scheduleId
- schedule IDschedule
- schedule to updateException
@DELETE @Path(value="/schedule/{id}") GenericResponse deleteSchedule(@PathParam(value="id") String scheduleId) throws Exception
scheduleId
- schedule IDException
@POST @Path(value="/schedule/{id}/execute") GenericResponse executeSchedule(@PathParam(value="id") String scheduleId) throws Exception
There is no check if the schedule schould be executed, besides a check if it is active.
scheduleId
- The schedule to executeException
@GET @Path(value="/schedule/{id}/execution") ExecutionListResponse listExecutions(@PathParam(value="id") String scheduleId, @BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam ExecutionFilterParameterBean executionFilterParameterBean) throws Exception
id
scheduleId
log
id
startTime
endTime
duration
result
scheduleId
- schedule IDfilter
- filter parameter beansorting
- sorting parameter beanpaging
- paging parameter beanexecutionFilterParameterBean
- execution specific filter parameter beanException
@GET @Path(value="/execution/{id}") ExecutionResponse getExecution(@PathParam(value="id") String executionId) throws Exception
executionId
- execution IDException
Copyright © 2024 Gentics Software. All rights reserved.