master
wangning 7 years ago
parent edf02f8c23
commit ff05fadea3

@ -15,6 +15,7 @@ import org.apache.commons.lang3.time.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
@ -29,7 +30,7 @@ import javax.annotation.Resource;
* Created by wangning on 2018/1/2.
*/
@Component
//@ConditionalOnProperty(value = "app.run-tasks", havingValue = "true")
@ConditionalOnProperty(value = "app.run-tasks", havingValue = "true")
public class PostponeClientTask {
Logger logger = LoggerFactory.getLogger(PostponeClientTask.class);
@ -44,7 +45,7 @@ public class PostponeClientTask {
@Resource
private ManagerMapper managerMapper;
// @Scheduled(cron = "0 30 8 * * ?")
@Scheduled(cron = "0 30 8 * * ?")
public void checkGreenChannel() {
Date now = new Date();
Date tomorrow = DateUtils.addDays(now, 1);

Loading…
Cancel
Save