MotechScheduledJob

public class MotechScheduledJob implements Job

Represents a MOTECH job scheduled with quartz. This class implements the org.quartz.Job interface - its execute method will be called when a MOTECH job in quartz triggers. Since jobs in MOTECH are basically org.motechproject.event.MotechEvents getting published on a quartz schedule, upon execution this class retrieves the org.motechproject.event.listener.EventRelay from the application context and uses it to immediately publish the event scheduled with this job. For every execution a new copy of the event is constructed.

Methods

execute

public void execute(JobExecutionContext jobExecutionContext)

Executes the job called by Quartz.

Parameters:
  • jobExecutionContext – the executionContext of the job provided by Quartz