本文整理汇总了Java中org.springframework.scheduling.quartz.SimpleTriggerFactoryBean.setJobDetail方法的典型用法代码示例。如果您正苦于以下问题:Java SimpleTriggerFactoryBean.setJobDetail方法的具体用法?Java SimpleTriggerFactoryBean.setJobDetail怎么用?Java SimpleTriggerFactoryBean.setJobDetail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.scheduling.quartz.SimpleTriggerFactoryBean
的用法示例。
在下文中一共展示了SimpleTriggerFactoryBean.setJobDetail方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createSimpleTrigger
import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean; //导入方法依赖的package包/类
/**
* 将任务与触发器关联
* 每一个任务,对应着一个触发器
* 每一个触发器,也只对应一个任务
*/
private SimpleTrigger createSimpleTrigger(String jobName) throws DuplicateJobException {
SimpleTriggerFactoryBean simpleTriggerFactoryBean = new SimpleTriggerFactoryBean();
JobDetail job = jobDetailFactoryBean(jobName).getObject();
simpleTriggerFactoryBean.setJobDetail(job);
simpleTriggerFactoryBean.setRepeatCount(0);
simpleTriggerFactoryBean.setRepeatInterval(12);
simpleTriggerFactoryBean.setGroup(jobName);
simpleTriggerFactoryBean.setName(jobName);
simpleTriggerFactoryBean.afterPropertiesSet();
return simpleTriggerFactoryBean.getObject();
}
示例2: getMonitorJobTrigger
import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean; //导入方法依赖的package包/类
@Bean
public SimpleTriggerFactoryBean getMonitorJobTrigger(){
SimpleTriggerFactoryBean bean = new SimpleTriggerFactoryBean();
bean.setJobDetail(getMonitorJob().getObject());
bean.setStartDelay(120000);
bean.setRepeatInterval(60000);
return bean;
}
示例3: getEventJobTrigger
import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean; //导入方法依赖的package包/类
@Bean
public SimpleTriggerFactoryBean getEventJobTrigger(){
SimpleTriggerFactoryBean bean = new SimpleTriggerFactoryBean();
bean.setJobDetail(getEventJob().getObject());
bean.setStartDelay(40000);
bean.setRepeatInterval(60000);
return bean;
}