Class SchedulerResource

java.lang.Object
com.atlassian.confluence.functest.rest.admin.SchedulerResource

@Consumes("application/json") @Produces("application/json") @Path("/admin/scheduler") public class SchedulerResource extends Object
Modifies the Scheduler.

Preferred invocation: ConfluenceRestClient.getAdminSession().scheduler()

Legacy invocation: ConfluenceRpc.admin.scheduler

  • Constructor Details

    • SchedulerResource

      @Inject public SchedulerResource(com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.scheduler.core.LifecycleAwareSchedulerService schedulerService, SchedulerRunDetailsManager schedulerRunDetailsManager)
  • Method Details

    • countAll

      @GET @Path("/count/{jobId}/{outcome}") public javax.ws.rs.core.Response countAll(@PathParam("jobId") String jobId, @PathParam("outcome") String outcome)
    • changeSchedulerState

      @POST public void changeSchedulerState(Map<String,Object> command) throws com.atlassian.scheduler.SchedulerServiceException
      Pauses and resumes the scheduler.
      Parameters:
      command - the command for the scheduler, name entry may be "pause", "resume" or "shutdown"
      Throws:
      com.atlassian.scheduler.SchedulerServiceException
    • changeJobGroupState

      @POST @Path("/job-runner/{jobRunnerKey}") public void changeJobGroupState(@PathParam("jobRunnerKey") String jobRunnerKey, Map<String,Object> command)
      Pauses all jobs for a JobRunner.
      Parameters:
      jobRunnerKey - the name of the JobRunner to control
      command - the command for the JobRunner, name entry may be "pause"
    • changeJobState

      @POST @Path("/job-id/{jobId}") public void changeJobState(@PathParam("jobId") String jobId, Map<String,Object> command)
      Controls a single job.

      Available commands are:

      1. pause - pauses the job 2. resume - resumes a paused job 3. trigger - triggers the job synchronously

      Parameters:
      jobId - the ID of the job to control
      command - the command for the job, name entry may be "pause", "resume" or "trigger"