public interface

ScheduledJobManager

com.atlassian.confluence.schedule.managers.ScheduledJobManager
Known Indirect Subclasses

Class Overview

Defines the services provided for manage scheduled jobs. Generally a ManagedScheduleJobException is thrown if the input is invalid (e.g. job does not exist) or if the type of request is not permitted (e.g. execute runNow when the job is not set to canRunAdhoc).

Summary

Public Methods
abstract void disable(ScheduledJobKey key)
Disables the specified job, and removes it from the scheduler.
abstract void enable(ScheduledJobKey key)
Enables the specified job, and adds it from the scheduler.
abstract String getCronExpression(ScheduledJobKey key)
Gets the currently configured cron expression, or the default value if none has been configured.
abstract ScheduledJobStatus getScheduledJob(ScheduledJobKey key)
Gets the current status for a single scheduled job.
abstract List<ScheduledJobStatus> getScheduledJobs()
Gets a list of all the jobs managed by the system, and their current status.
abstract void runNow(ScheduledJobKey key)
Schedules the specified to run immediately.
abstract Date updateSchedule(ScheduledJobKey key, String newCronSchedule)
Updates stored schedule and reschedules the specified job.

Public Methods

public abstract void disable (ScheduledJobKey key)

Disables the specified job, and removes it from the scheduler. Requires canDisable() to be true.

Parameters
key the job key

public abstract void enable (ScheduledJobKey key)

Enables the specified job, and adds it from the scheduler. Requires canDisable() to be true.

Parameters
key the job key

public abstract String getCronExpression (ScheduledJobKey key)

Gets the currently configured cron expression, or the default value if none has been configured.

Parameters
key the job key
Returns
  • gets the currently configured cron schedule for the specified job. Null if not a cron job.

public abstract ScheduledJobStatus getScheduledJob (ScheduledJobKey key)

Gets the current status for a single scheduled job.

Parameters
key the job key

public abstract List<ScheduledJobStatus> getScheduledJobs ()

Gets a list of all the jobs managed by the system, and their current status.

Returns
  • the managed jobs.

public abstract void runNow (ScheduledJobKey key)

Schedules the specified to run immediately. Requires canRunAdhoc() to be true.

Parameters
key the job key

public abstract Date updateSchedule (ScheduledJobKey key, String newCronSchedule)

Updates stored schedule and reschedules the specified job. Only valid for ManagedScheduledCronJob jobs and requires isEditable() to be true.

Parameters
key the job key
newCronSchedule a valid cron expression
Returns
  • the next Date of execution