RepeatingPeriodSchedulableJob

public class RepeatingPeriodSchedulableJob implements SchedulableJob, Serializable

Job that will be fired every org.joda.time.Period of time

Constructors

RepeatingPeriodSchedulableJob

public RepeatingPeriodSchedulableJob()

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 and repeat period are not assigned, which means that further usage, without setting them, can cause exceptions.

RepeatingPeriodSchedulableJob

public RepeatingPeriodSchedulableJob(MotechEvent motechEvent, Date startTime, Date endTime, Period repeatPeriod, boolean ignorePastFiresAtStart)

Constructor.

Parameters:
  • motechEvent – the MotechEvent which will be fired when the job triggers, not null
  • startTime – the Date at which job should become ACTIVE, not null
  • endTime – the Date at which job should be stopped, null treated as never end
  • repeatPeriod – the Period between job fires, not null
  • ignorePastFiresAtStart – the flag defining whether job should ignore past fires at start or not

Methods

equals

public boolean equals(Object obj)

getEndTime

public Date getEndTime()

getMotechEvent

public MotechEvent getMotechEvent()

getRepeatPeriod

public Period getRepeatPeriod()

getStartTime

public Date getStartTime()

hashCode

public int hashCode()

isIgnorePastFiresAtStart

public boolean isIgnorePastFiresAtStart()

isUseOriginalFireTimeAfterMisfire

public boolean isUseOriginalFireTimeAfterMisfire()

setEndTime

public RepeatingPeriodSchedulableJob setEndTime(Date endTime)

setIgnorePastFiresAtStart

public RepeatingPeriodSchedulableJob setIgnorePastFiresAtStart(boolean ignorePastFiresAtStart)

setMotechEvent

public RepeatingPeriodSchedulableJob setMotechEvent(MotechEvent motechEvent)

setRepeatPeriod

public void setRepeatPeriod(Period repeatPeriod)

setStartTime

public RepeatingPeriodSchedulableJob setStartTime(Date startTime)

setUseOriginalFireTimeAfterMisfire

public RepeatingPeriodSchedulableJob setUseOriginalFireTimeAfterMisfire(boolean useOriginalFireTimeAfterMisfire)

toString

public String toString()