Interface SchedulerResource


@Path("scheduler") public interface SchedulerResource
Resource for managing the scheduler
  • 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

      @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 bean
      sorting - sorting parameter bean
      paging - paging parameter bean
      jobFilter - 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 by
      • id
      • name
      • description
      • command
      and sorted by
      • id
      • name
      • description
      • command
      • cdate
      • edate
      Parameters:
      filter - filter parameter bean
      sorting - sorting parameter bean
      paging - paging parameter bean
      perms - 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 ID
      task - 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 by
      • id
      • name
      • description
      • taskId
      and sorted by
      • id
      • name
      • description
      • taskId
      • cdate
      • edate
      Parameters:
      filter - filter parameter bean
      sorting - sorting parameter bean
      paging - paging parameter bean
      perms - permissions parameter bean
      embed - 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 ID
      schedule - 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 by
      • id
      • scheduleId
      • log
      and sorted by
      • id
      • startTime
      • endTime
      • duration
      • result
      Parameters:
      scheduleId - schedule ID
      filter - filter parameter bean
      sorting - sorting parameter bean
      paging - paging parameter bean
      executionFilterParameterBean - execution specific filter parameter bean
      embed - 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