CronSchedulableJob

public class CronSchedulableJob implements SchedulableJob, Serializable

Schedulable Job - a data carrier class for a scheduled job that can be fired unlimited number of times as specified with the cron expression

Author:Igor (iopushnyev@2paths.com) Date: 16/02/11 Time: 1:43 PM

Constructors

CronSchedulableJob

public CronSchedulableJob(MotechEvent motechEvent, String cronExpression, Date startTime, Date endTime)

Constructor.

Parameters:
  • motechEvent – the MotechEvent fired, when job triggers, not null
  • cronExpression – the cron expression, which defines when job should be fired, 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

CronSchedulableJob

public CronSchedulableJob(MotechEvent motechEvent, String cronExpression)

Constructor.

Parameters:
  • motechEvent – the MotechEvent fired, when job triggers, not null
  • cronExpression – the cron expression, which defines when job should be fired, not null

CronSchedulableJob

public CronSchedulableJob(MotechEvent motechEvent, String cronExpression, Date startTime, Date endTime, boolean ignorePastFiresAtStart)

Constructor.

Parameters:
  • motechEvent – the MotechEvent fired, when job triggers, not null
  • cronExpression – the cron expression, which defines when job should be fired, 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
  • ignorePastFiresAtStart – the flag defining, whether job should ignore past fires at start or not

Methods

equals

public boolean equals(Object obj)

getCronExpression

public String getCronExpression()

getEndTime

public Date getEndTime()

getMotechEvent

public MotechEvent getMotechEvent()

getStartTime

public Date getStartTime()

hashCode

public int hashCode()

isIgnorePastFiresAtStart

public boolean isIgnorePastFiresAtStart()

toString

public String toString()