public interface ScheduledJobManager
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).
Modifier and Type | Method and Description |
---|---|
void |
disable(ScheduledJobKey key)
Disables the specified job, and removes it from the scheduler.
|
void |
enable(ScheduledJobKey key)
Enables the specified job, and adds it from the scheduler.
|
String |
getCronExpression(ScheduledJobKey key)
Gets the currently configured cron expression, or the default value if none has been configured.
|
ScheduledJobStatus |
getScheduledJob(ScheduledJobKey key)
Gets the current status for a single scheduled job.
|
List<ScheduledJobStatus> |
getScheduledJobs()
Gets a list of all the jobs managed by the system, and their current status.
|
void |
runNow(ScheduledJobKey key)
Schedules the specified to run immediately.
|
Date |
updateSchedule(ScheduledJobKey key,
String newCronSchedule)
Updates stored schedule and reschedules the specified job.
|
List<ScheduledJobStatus> getScheduledJobs()
ScheduledJobStatus getScheduledJob(ScheduledJobKey key)
key
- the job keyDate updateSchedule(ScheduledJobKey key, String newCronSchedule)
Only valid for ManagedScheduledCronJob
jobs and requires
ManagedScheduledJob.isEditable()
to be true.
key
- the job keynewCronSchedule
- a valid cron expressionvoid runNow(ScheduledJobKey key)
Requires ManagedScheduledJob.canRunAdhoc()
to be true.
key
- the job keyvoid disable(ScheduledJobKey key)
Requires ManagedScheduledJob.canDisable()
to be true.
key
- the job keyvoid enable(ScheduledJobKey key)
Requires ManagedScheduledJob.canDisable()
to be true.
key
- the job keyString getCronExpression(ScheduledJobKey key)
key
- the job keyCopyright © 2003–2016 Atlassian. All rights reserved.