Class ScheduledSimpleJob
java.lang.Object
com.atlassian.confluence.schedule.AbstractScheduledJob
com.atlassian.confluence.schedule.ScheduledSimpleJob
- All Implemented Interfaces:
ScheduledJob
This class is for easily setting an atlassian-scheduler interval job from Spring.
The
firstRunTime
in the schedule of
is JobConfig
is set to null
(the job should run as soon as possible).
You may need to customize it.
If your job is only meaningful in clustered environment, use the constructor
that can set clusteredOnly
to true
so that your job won't be
scheduled in non-clustered environments.
- Since:
- 5.10
-
Constructor Summary
ConstructorDescriptionScheduledSimpleJob
(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, long repeatInterval) id
is used for bothJobRunnerKey
to register thejobRunner
andJobId
to schedule the job.ScheduledSimpleJob
(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, long repeatInterval, boolean clusteredOnly) id
is used for bothJobRunnerKey
to register thejobRunner
andJobId
to schedule the job.ScheduledSimpleJob
(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, long repeatInterval, int repeatCount, int jitterSecs) id
is used for bothJobRunnerKey
to register thejobRunner
andJobId
to schedule the job.ScheduledSimpleJob
(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, long repeatInterval, int repeatCount, int jitterSecs, boolean clusteredOnly) id
is used for bothJobRunnerKey
to register thejobRunner
andJobId
to schedule the job. -
Method Summary
Modifier and TypeMethodDescriptionstatic com.atlassian.scheduler.config.JobConfig
toJobConfig
(String jobRunnerKey, boolean runOncePerCluster, long repeatInterval, int repeatCount) static com.atlassian.scheduler.config.JobConfig
toJobConfig
(String jobRunnerKey, boolean runOncePerCluster, long repeatInterval, int repeatCount, int jitterSecs) Methods inherited from class com.atlassian.confluence.schedule.AbstractScheduledJob
equals, getJobConfig, getJobRunner, hashCode, isClusteredOnly, toString
-
Constructor Details
-
ScheduledSimpleJob
public ScheduledSimpleJob(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, long repeatInterval) id
is used for bothJobRunnerKey
to register thejobRunner
andJobId
to schedule the job. -
ScheduledSimpleJob
public ScheduledSimpleJob(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, long repeatInterval, boolean clusteredOnly) id
is used for bothJobRunnerKey
to register thejobRunner
andJobId
to schedule the job. -
ScheduledSimpleJob
public ScheduledSimpleJob(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, long repeatInterval, int repeatCount, int jitterSecs) id
is used for bothJobRunnerKey
to register thejobRunner
andJobId
to schedule the job. -
ScheduledSimpleJob
public ScheduledSimpleJob(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, long repeatInterval, int repeatCount, int jitterSecs, boolean clusteredOnly) id
is used for bothJobRunnerKey
to register thejobRunner
andJobId
to schedule the job.
-
-
Method Details
-
toJobConfig
public static com.atlassian.scheduler.config.JobConfig toJobConfig(String jobRunnerKey, boolean runOncePerCluster, long repeatInterval, int repeatCount) -
toJobConfig
public static com.atlassian.scheduler.config.JobConfig toJobConfig(String jobRunnerKey, boolean runOncePerCluster, long repeatInterval, int repeatCount, int jitterSecs)
-