schedule
主要解决分布式环境当中quartz的调度不适合多份部署的影响
当前项目只支持同一时间保证只有一份job会被调度
目前项目支持到热部署,实时修改项目的job调度时间等
修复了项目重启定时任务失效的bug
EXAMPLE:
pom.xml
com.syj.schedule
schedule-core
1.0-SNAPSHOT
spring.xml
@Configuration
@ComponentScan("com.syj.schedule")
public class SpringBeans {
private String zookeeperlist="localhost:2181";
@Autowired
ZookeeperProfile profile;
@Bean
public ZookeeperProfile createProfile(){
ZookeeperProfile profile = new ZookeeperProfile(zookeeperlist,"/schedule");
return profile;
}
@Bean
public ScheduleSpringFactroy createFactory(){
ScheduleSpringFactroy factroy = new ScheduleSpringFactroy();
factroy.setZookeeperProfile(profile);
return factroy;
}
}