Example usage for org.springframework.scheduling.quartz SimpleTriggerFactoryBean setRepeatCount

List of usage examples for org.springframework.scheduling.quartz SimpleTriggerFactoryBean setRepeatCount

Introduction

In this page you can find the example usage for org.springframework.scheduling.quartz SimpleTriggerFactoryBean setRepeatCount.

Prototype

public void setRepeatCount(int repeatCount) 

Source Link

Document

Specify the number of times this trigger is supposed to fire.

Usage

From source file:mg.jerytodik.scheduler.config.JeryTodikSchedulerConfig.java

@Bean
public SimpleTriggerFactoryBean trigger(final JobDetail job) {

    SimpleTriggerFactoryBean trigger = new SimpleTriggerFactoryBean();
    trigger.setJobDetail(job);//www .  j  a  v  a 2  s .com
    trigger.setRepeatInterval(Long.parseLong(env.getProperty("jerytodik.scheduling.interval")));
    trigger.setRepeatCount(SimpleTrigger.REPEAT_INDEFINITELY);

    return trigger;
}