コード例 #1
0
 @Bean
 public JobDetailFactoryBean process() {
   JobDetailFactoryBean jobDetailFactory = new JobDetailFactoryBean();
   jobDetailFactory.setJobClass(FooJob.class);
   jobDetailFactory.setDurability(true);
   return jobDetailFactory;
 }
コード例 #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;
 }
コード例 #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;
 }