DayOfWeekSchedulableJob

public final class DayOfWeekSchedulableJob extends EndingSchedulableJob

Job that is scheduled on particular days of week

Constructors

DayOfWeekSchedulableJob

public DayOfWeekSchedulableJob()

Default constructor.

DayOfWeekSchedulableJob

public DayOfWeekSchedulableJob(MotechEvent motechEvent, DateTime startDate, DateTime endDate, List<DayOfWeek> days, Time time, boolean ignorePastFiresAtStart)

Constructor.

Parameters:
  • motechEvent – the MotechEvent fired, when job triggers, not null
  • startDate – the Date at which job should become ACTIVE, not null
  • endDate – 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, DateTime startDate, DateTime endDate, List<DayOfWeek> days, Time time)

Constructor.

Parameters:
  • motechEvent – the MotechEvent fired, when job triggers, not null
  • startDate – the Date at which job should become ACTIVE, not null
  • endDate – 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

DayOfWeekSchedulableJob

public DayOfWeekSchedulableJob(MotechEvent motechEvent, DateTime startDate, DateTime endDate, List<DayOfWeek> days, Time time, boolean ignorePastFiresAtStart, boolean uiDefined)

Constructor.

Parameters:
  • motechEvent – the MotechEvent fired, when job triggers, not null
  • startDate – the Date at which job should become ACTIVE, not null
  • endDate – 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
  • uiDefined – the flag defining, whether job has been created through the UI

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

getDays

public List<DayOfWeek> getDays()

Return the list of days the job will be executed at.

Returns:the list of days

getTime

public Time getTime()

Returns the time of the job execution.

Returns:the execution time

setDays

public void setDays(List<DayOfWeek> days)

Sets the list of days the job will be executed at.

Parameters:
  • days – the list of days

setTime

public void setTime(Time time)

Set the time of the job execution.

Parameters:
  • time – the execution time