Class SchedulerResource


  • public class SchedulerResource
    extends Object
    Modifies the Scheduler.

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

    Legacy invocation: ConfluenceRpc.admin.scheduler

    • Constructor Detail

      • SchedulerResource

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

      • countAll

        public javax.ws.rs.core.Response countAll​(String jobId,
                                                  String outcome)
      • changeSchedulerState

        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

        public void changeJobGroupState​(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

        public void changeJobState​(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"