DayOfWeekSchedulableJob

public final class DayOfWeekSchedulableJob implements SchedulableJob, Serializable

Job that is scheduled on particular days of week

Constructors

DayOfWeekSchedulableJob

public DayOfWeekSchedulableJob(MotechEvent motechEvent, LocalDate start, LocalDate end, List<DayOfWeek> days, Time time, boolean ignorePastFiresAtStart)

Constructor.

Parameters:
  • motechEvent – the MotechEvent fired, when job triggers, not null
  • start – the Date at which job should become ACTIVE, not null
  • end – the Date at which job should be stopped, null treated as never end
  • days – the list of days at which job should be fired, not null
  • time – the time at which job should be fired, not null
  • ignorePastFiresAtStart – the flag defining whether job should ignore past fires at start or not

DayOfWeekSchedulableJob

public DayOfWeekSchedulableJob(MotechEvent motechEvent, LocalDate start, LocalDate end, List<DayOfWeek> days, Time time)

Constructor.

Parameters:
  • motechEvent – the MotechEvent fired, when job triggers, not null
  • start – the Date at which job should become ACTIVE, not null
  • end – the Date at which job should be stopped, null treated as never end
  • days – the list of days at which job should be fired, not null
  • time – the time at which job should be fired, not null

Methods

getCronDays

public List<Integer> getCronDays()

Returns list of days(as Integer) at which Job should be fired.

Returns:list of days(as Integer) at which Job should be fired

getEndDate

public LocalDate getEndDate()

getMotechEvent

public MotechEvent getMotechEvent()

getStartDate

public LocalDate getStartDate()

getTime

public Time getTime()

isIgnorePastFiresAtStart

public boolean isIgnorePastFiresAtStart()