@Bean
 public JobDetailFactoryBean process() {
   JobDetailFactoryBean jobDetailFactory = new JobDetailFactoryBean();
   jobDetailFactory.setJobClass(FooJob.class);
   jobDetailFactory.setDurability(true);
   return jobDetailFactory;
 }
Exemplo n.º 2
0
 @Bean
 public JobDetailFactoryBean jobDetailFactoryBean() {
   JobDetailFactoryBean factory = new JobDetailFactoryBean();
   factory.setJobClass(ScheduleJob.class);
   Map<String, Object> map = new HashMap<String, Object>();
   map.put("status", Status.DONE);
   factory.setJobDataAsMap(map);
   factory.setGroup("schedule");
   factory.setName("deleteAllByStatus");
   return factory;
 }
Exemplo n.º 3
0
 @Bean
 public JobDetailFactoryBean jobDetailFactoryBean() {
   JobDetailFactoryBean factory = new JobDetailFactoryBean();
   factory.setJobClass(MyJobTwo.class);
   Map<String, Object> map = new HashMap<String, Object>();
   map.put("name", "RAM");
   map.put(MyJobTwo.COUNT, 1);
   factory.setJobDataAsMap(map);
   factory.setGroup("mygroup");
   factory.setName("myjob");
   return factory;
 }