Class ScheduledCronJob
- java.lang.Object
-
- com.atlassian.confluence.schedule.AbstractScheduledJob
-
- com.atlassian.confluence.schedule.ScheduledCronJob
-
- All Implemented Interfaces:
ScheduledJob
public class ScheduledCronJob extends AbstractScheduledJob
This class is for easily setting an atlassian-scheduler cron job from Spring. TheSchedule.forCronExpression(String, TimeZone)timeZone} in the schedule of itsJobConfigis set tonull(system default). You may need to customize it.If your job is only meaningful in clustered environment, use the constructor that can set
clusteredOnlytotrueso that your job won't be scheduled in non-clustered environments.- Since:
- 5.10
-
-
Constructor Summary
Constructors Constructor Description ScheduledCronJob(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, String cronExpression)idis used for bothJobRunnerKeyto register thejobRunnerandJobIdto schedule the job.ScheduledCronJob(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, String cronExpression, boolean clusteredOnly)idis used for bothJobRunnerKeyto register thejobRunnerandJobIdto schedule the job.ScheduledCronJob(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, String cronExpression, int jitterSecs)idis used for bothJobRunnerKeyto register thejobRunnerandJobIdto schedule the job.ScheduledCronJob(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, String cronExpression, int jitterSecs, boolean clusteredOnly)idis used for bothJobRunnerKeyto register thejobRunnerandJobIdto schedule the job.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.atlassian.scheduler.config.JobConfigtoJobConfig(String jobRunnerKey, boolean runOncePerCluster, String cronExpression)static com.atlassian.scheduler.config.JobConfigtoJobConfig(String jobRunnerKey, boolean runOncePerCluster, String cronExpression, int jitterSecs)-
Methods inherited from class com.atlassian.confluence.schedule.AbstractScheduledJob
equals, getJobConfig, getJobRunner, hashCode, isClusteredOnly, toString
-
-
-
-
Constructor Detail
-
ScheduledCronJob
public ScheduledCronJob(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, String cronExpression)
idis used for bothJobRunnerKeyto register thejobRunnerandJobIdto schedule the job.
-
ScheduledCronJob
public ScheduledCronJob(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, String cronExpression, int jitterSecs)
idis used for bothJobRunnerKeyto register thejobRunnerandJobIdto schedule the job.
-
ScheduledCronJob
public ScheduledCronJob(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, String cronExpression, boolean clusteredOnly)
idis used for bothJobRunnerKeyto register thejobRunnerandJobIdto schedule the job.
-
-