定时任务表达式优化处理

master
Bosen 2021-06-02 23:00:08 +08:00
parent 9b5487d2f2
commit 9c6ed2541e
1 changed files with 4 additions and 4 deletions

View File

@ -40,7 +40,7 @@ public class SchedulerTask {
/*
*
*/
@Scheduled(cron="* */1 * * * ?")
@Scheduled(cron="0 0/1 * * * ?")
@Transactional
public void delOverOrder(){
long time = 2*60*60*1000;// 订单过期时间,两小时
@ -60,7 +60,7 @@ public class SchedulerTask {
/*
*
*/
@Scheduled(cron="* */1 * * * ?")
@Scheduled(cron="0 0/1 * * * ?")
public void delQRCode(){
long time = 2*60*60*1000;// 订单过期时间,两小时
List<SysOrder> list = orderMapper.findAll();
@ -74,7 +74,7 @@ public class SchedulerTask {
/*
*
*/
@Scheduled(cron="* */1 * * * ?")
@Scheduled(cron="0 0/1 * * * ?")
public void sendNotice(){
while (redisTemplate.opsForList().size("notice")!=0){
Map<String,String> map = (Map<String,String>)redisTemplate.opsForList().rightPop("notice");
@ -100,7 +100,7 @@ public class SchedulerTask {
/*
*
*/
@Scheduled(cron="* */1 * * * ?")
@Scheduled(cron="0 0/1 * * * ?")
public void sendEmail(){
while (redisTemplate.opsForList().size("email")!=0){
Map<String,String> map = (Map<String,String>)redisTemplate.opsForList().rightPop("email");