Commit 80fd455e authored by xuxin's avatar xuxin

临时修改定时任务,仅仅在测试环境使用

parent 2a52374d
...@@ -27,8 +27,10 @@ public class PromotionTask { ...@@ -27,8 +27,10 @@ public class PromotionTask {
@Autowired @Autowired
private UserPrePaidBillingRepository userPrePaidBillingRepository; private UserPrePaidBillingRepository userPrePaidBillingRepository;
//临时修改为每2分钟执行一次
@SchedulerLock(name = "countGift", lockAtLeastForString = "PT1H", lockAtMostForString = "PT2H") @SchedulerLock(name = "countGift", lockAtLeastForString = "PT1H", lockAtMostForString = "PT2H")
@Scheduled(cron = "0 0 1 1 * ?") //@Scheduled(cron = "0 0 1 1 * ?")
@Scheduled(cron = "0 2 * * * ?")
public void countGift() { public void countGift() {
log.info("Start scheduled task:Scheduled.countGift..."); log.info("Start scheduled task:Scheduled.countGift...");
List<Account> accounts = accountRepository.findByParentIsNull(); List<Account> accounts = accountRepository.findByParentIsNull();
...@@ -78,8 +80,10 @@ public class PromotionTask { ...@@ -78,8 +80,10 @@ public class PromotionTask {
log.info("End scheduled task:Scheduled.countGift..."); log.info("End scheduled task:Scheduled.countGift...");
} }
//临时修改为每1分钟执行一次
@SchedulerLock(name = "countCommission", lockAtLeastForString = "PT1H", lockAtMostForString = "PT2H") @SchedulerLock(name = "countCommission", lockAtLeastForString = "PT1H", lockAtMostForString = "PT2H")
@Scheduled(cron = "0 0 1 * * ?") //@Scheduled(cron = "0 0 1 * * ?")
@Scheduled(cron = "0 1 * * * ?")
public void countCommission() { public void countCommission() {
log.info("Start scheduled task:Scheduled.countCommission..."); log.info("Start scheduled task:Scheduled.countCommission...");
List<Account> accounts = accountRepository.findByParentIsNull(); List<Account> accounts = accountRepository.findByParentIsNull();
......
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