Search in sources :

Example 1 with ExecutionTrigger

use of org.eclipse.scout.rt.platform.job.ExecutionTrigger in project scout.rt by eclipse.

the class JobFutureTask method createQuartzTrigger.

/**
 * Creates the Quartz Trigger to fire execution.
 */
protected OperableTrigger createQuartzTrigger(final JobInput input) {
    final TriggerBuilder<Trigger> builder = TriggerBuilder.newTrigger().forJob(JobFutureTask.class.getSimpleName());
    final ExecutionTrigger executionTrigger = input.getExecutionTrigger();
    if (executionTrigger != null) {
        builder.startAt(executionTrigger.getStartTime()).endAt(executionTrigger.getEndTime()).withSchedule(executionTrigger.getSchedule());
    }
    return (OperableTrigger) builder.build();
}
Also used : ExecutionTrigger(org.eclipse.scout.rt.platform.job.ExecutionTrigger) OperableTrigger(org.quartz.spi.OperableTrigger) Trigger(org.quartz.Trigger) OperableTrigger(org.quartz.spi.OperableTrigger) ExecutionTrigger(org.eclipse.scout.rt.platform.job.ExecutionTrigger)

Aggregations

ExecutionTrigger (org.eclipse.scout.rt.platform.job.ExecutionTrigger)1 Trigger (org.quartz.Trigger)1 OperableTrigger (org.quartz.spi.OperableTrigger)1