Commit ef6631ac authored by wanghao's avatar wanghao

1 测试 上电后通信 和 最终完成 定时任务功能

parent e6f58e8e
package com.zehong.framework.config.properties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.quartz.SchedulerFactoryBean;
import javax.sql.DataSource;
import java.util.Properties;
/**
* @author lenovo
* @date 2025/9/23
* @description TODO
*/
@Configuration
public class QuartzConfig {
@Bean
public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource) {
SchedulerFactoryBean factory = new SchedulerFactoryBean();
factory.setDataSource(dataSource);
factory.setAutoStartup(true);
factory.setWaitForJobsToCompleteOnShutdown(true);
factory.setOverwriteExistingJobs(true);
Properties props = new Properties();
props.put("org.quartz.scheduler.instanceName", "DeviceScheduler");
props.put("org.quartz.scheduler.instanceId", "AUTO");
props.put("org.quartz.jobStore.misfireThreshold", "60000");
factory.setQuartzProperties(props);
return factory;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment