Interface ScheduledJobManager
- All Known Implementing Classes:
- DefaultScheduledJobManager,- MockScheduledJobManager
@Transactional
public interface ScheduledJobManager
Defines the services provided for manage scheduled jobs.
 
 Generally a ManagedScheduledJobException 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).
- Since:
- 3.5
- 
Method SummaryModifier and TypeMethodDescriptionvoiddisable(com.atlassian.scheduler.config.JobId jobId) Disables the specified job, and removes it from the scheduler.voidenable(com.atlassian.scheduler.config.JobId jobId) Enables the specified job, and adds it to the scheduler.getCronExpression(com.atlassian.scheduler.config.JobId jobId) Gets the currently configured cron expression, or the default value if none has been configured.getRepeatInterval(com.atlassian.scheduler.config.JobId jobId) Gets the currently configured repeat interval, or the default value if none has been configured.getScheduledJob(com.atlassian.scheduler.config.JobId jobId) Gets the list of managed job status.voidrunNow(com.atlassian.scheduler.config.JobId jobId) Schedules the specified to run immediately.updateCronJobSchedule(com.atlassian.scheduler.config.JobId jobId, String newCronSchedule) Updates stored schedule.updateSimpleJobSchedule(com.atlassian.scheduler.config.JobId jobId, long repeatInterval) Updates stored schedule.
- 
Method Details- 
getScheduledJobsGets the list of managed job status.
- 
getScheduledJob@Transactional(readOnly=true) ScheduledJobStatus getScheduledJob(com.atlassian.scheduler.config.JobId jobId) 
- 
updateCronJobScheduleUpdates stored schedule. If the job is being scheduled e.g. enabled, it will be rescheduled. If the job is not being scheduled e.g. disabled, it won't be rescheduled.Only valid for ManagedScheduledCronJoband requiresAbstractManagedScheduledJob.isEditable()to be true.- Returns:
- Date of the next execution
 
- 
updateSimpleJobScheduleUpdates stored schedule. If the job is being scheduled e.g. enabled, it will be rescheduled. If the job is not being scheduled e.g. disabled, it won't be rescheduled.Only valid for ManagedScheduledSimpleJoband requiresAbstractManagedScheduledJob.isEditable()to be true.- Returns:
- Date of the next execution
 
- 
runNowvoid runNow(com.atlassian.scheduler.config.JobId jobId) Schedules the specified to run immediately.Requires ManagedScheduledJob.canRunAdhoc()to be true.
- 
disablevoid disable(com.atlassian.scheduler.config.JobId jobId) Disables the specified job, and removes it from the scheduler.Requires ManagedScheduledJob.canDisable()to be true.
- 
enablevoid enable(com.atlassian.scheduler.config.JobId jobId) Enables the specified job, and adds it to the scheduler.Requires ManagedScheduledJob.canDisable()to be true.
- 
getCronExpressionGets the currently configured cron expression, or the default value if none has been configured.- Returns:
- nullif not a cron job.
 
- 
getRepeatIntervalGets the currently configured repeat interval, or the default value if none has been configured.- Returns:
- nullif not a simple job
 
 
-