public class DefaultScheduledJobManager extends Object implements ScheduledJobManager
Constructor and Description |
---|
DefaultScheduledJobManager(ScheduledJobDao jobDAO,
org.quartz.Scheduler scheduler,
ManagedScheduledJobRegistry jobRegistry,
AuditService auditService,
ScheduleJobStatusManager statusManager,
com.atlassian.sal.api.timezone.TimeZoneManager timeZoneManager) |
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.
|
public DefaultScheduledJobManager(ScheduledJobDao jobDAO, org.quartz.Scheduler scheduler, ManagedScheduledJobRegistry jobRegistry, AuditService auditService, ScheduleJobStatusManager statusManager, com.atlassian.sal.api.timezone.TimeZoneManager timeZoneManager)
public List<ScheduledJobStatus> getScheduledJobs()
ScheduledJobManager
getScheduledJobs
in interface ScheduledJobManager
public ScheduledJobStatus getScheduledJob(ScheduledJobKey key)
ScheduledJobManager
getScheduledJob
in interface ScheduledJobManager
key
- the job keypublic Date updateSchedule(ScheduledJobKey key, String newCronSchedule)
ScheduledJobManager
Only valid for ManagedScheduledCronJob
jobs and requires
ManagedScheduledJob.isEditable()
to be true.
updateSchedule
in interface ScheduledJobManager
key
- the job keynewCronSchedule
- a valid cron expressionpublic void runNow(ScheduledJobKey key)
ScheduledJobManager
Requires ManagedScheduledJob.canRunAdhoc()
to be true.
runNow
in interface ScheduledJobManager
key
- the job keypublic void disable(ScheduledJobKey key)
ScheduledJobManager
Requires ManagedScheduledJob.canDisable()
to be true.
disable
in interface ScheduledJobManager
key
- the job keypublic void enable(ScheduledJobKey key)
ScheduledJobManager
Requires ManagedScheduledJob.canDisable()
to be true.
enable
in interface ScheduledJobManager
key
- the job keypublic String getCronExpression(ScheduledJobKey key)
ScheduledJobManager
getCronExpression
in interface ScheduledJobManager
key
- the job keyCopyright © 2003–2016 Atlassian. All rights reserved.