This commit is contained in:
liuchengqian 2023-03-07 17:17:34 +08:00
parent 6ae7f020d2
commit dc450d6ce1

View File

@ -0,0 +1,26 @@
package com.xkrs.common;
import com.xkrs.straw.utils.FirePointSubscribeManager;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import javax.annotation.Resource;
/**
* 更新订阅计划任务
*/
@Configuration
@EnableScheduling
public class StaticScheduleTask {
@Resource
private FirePointSubscribeManager firePointSubscribeManager;
//每两小时更新一次订阅
@Scheduled(cron = "0 0 */2 * * ?")
private void syncSubscribe() {
firePointSubscribeManager.autoSync();
}
}