import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Component
@Slf4j
public class PushOntimeSchedule {
@Autowired
private IUcPushService ucPushService;
@Autowired
private AsyncPushService asyncPushService;
/**
* 对正在待推送的配置,推送消息
*/
// @Scheduled(cron = "0 0/1 * * * ?") // 定时器1分钟一次
// @Scheduled(cron = "0 0/30 8-23 * * ?") //早上8点到晚上11点,定时器30分钟一次
// @Scheduled(cron = "0 0 3 * * ?") // 定时器凌晨3点1次
// @Scheduled(cron = "0 1 0 * * ?") // 每天凌晨1分钟定时一次
// @Scheduled(fixedRate = 10000)// 每隔10秒执行一次,更新订单状态
@Scheduled(cron = "0 0/30 * * * ?") //定时器30分钟一次
public void updatePushOntimeSchedule() {
List<UcPush> pushs = ucPushService.se
09-29
928
928
10-20
1万+
1万+

最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



