RepeatingSchedulableJob¶
-
public class
RepeatingSchedulableJobimplements SchedulableJob, Serializable¶ Schedulable Job - a data carrier class for a scheduled job that can be fired set number of times
Constructors¶
RepeatingSchedulableJob¶
-
public
RepeatingSchedulableJob()¶ Constructor. It will create a job, which will never end, won’t ignore past fires at start and will use original fire time after misfire. Start time,
MotechEvent, repeat count and repeat interval are not assigned, which means that further usage, without setting them, can cause exceptions.
RepeatingSchedulableJob¶
-
public
RepeatingSchedulableJob(MotechEvent motechEvent, Integer repeatCount, Integer repeatIntervalInSeconds, Date startTime, Date endTime, boolean ignorePastFiresAtStart)¶ Constructor.
Parameters: - motechEvent – the
MotechEventwhich will be fired when the job triggers, not null - repeatCount – the number of times job should be repeated, null treated as infinite
- repeatIntervalInSeconds – the interval(in seconds) between job fires
- startTime – the
Dateat which job should become ACTIVE, not null - endTime – the
Dateat which job should be stopped, null treated as never end - ignorePastFiresAtStart – the flag defining whether job should ignore past fires at start or not
- motechEvent – the
RepeatingSchedulableJob¶
-
public
RepeatingSchedulableJob(MotechEvent motechEvent, Integer repeatIntervalInSeconds, Date startTime, Date endTime, boolean ignorePastFiresAtStart)¶ Constructor.
Parameters: - motechEvent – the
MotechEventwhich will be fired when the job triggers, not null - repeatIntervalInSeconds – the interval(in seconds) between job fires
- startTime – the
Dateat which job should become ACTIVE, not null - endTime – the
Dateat which job should be stopped, null treated as never end - ignorePastFiresAtStart – the flag defining whether job should ignore past fires at start or not
- motechEvent – the
Methods¶
getMotechEvent¶
-
public MotechEvent
getMotechEvent()¶
setEndTime¶
-
public RepeatingSchedulableJob
setEndTime(Date endTime)¶
setIgnorePastFiresAtStart¶
-
public RepeatingSchedulableJob
setIgnorePastFiresAtStart(boolean ignorePastFiresAtStart)¶ Ignore past fires when start time of job is in past.
ex : repeating job with interval of 5 unit, and current time in between fire 2 and 3 will start triggering from 3rd firetime. 1 2 3 4 +-----+-----+-----+ start ^current time
Parameters: - ignorePastFiresAtStart –
setMotechEvent¶
-
public RepeatingSchedulableJob
setMotechEvent(MotechEvent motechEvent)¶
setRepeatCount¶
-
public RepeatingSchedulableJob
setRepeatCount(Integer repeatCount)¶
setRepeatIntervalInSeconds¶
-
public RepeatingSchedulableJob
setRepeatIntervalInSeconds(Integer repeatIntervalInSeconds)¶
setStartTime¶
-
public RepeatingSchedulableJob
setStartTime(Date startTime)¶
setUseOriginalFireTimeAfterMisfire¶
-
public RepeatingSchedulableJob
setUseOriginalFireTimeAfterMisfire(boolean useOriginalFireTimeAfterMisfire)¶