ScheduleJob.java 788 B

1234567891011121314151617181920212223242526272829
  1. package com.fdkankan.download.schedule;
  2. import com.fdkankan.download.service.ISceneDownLoadService;
  3. import com.fdkankan.redis.util.RedisUtil;
  4. import lombok.extern.slf4j.Slf4j;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.scheduling.annotation.Scheduled;
  7. import org.springframework.stereotype.Component;
  8. @Slf4j
  9. @Component
  10. public class ScheduleJob {
  11. @Autowired
  12. RedisUtil redisUtil;
  13. @Autowired
  14. ISceneDownLoadService sceneDownLoadService;
  15. @Scheduled(cron = "0/5 * * * * ? ")
  16. public void job4SceneDownload() throws Exception {
  17. sceneDownLoadService.process();
  18. }
  19. @Scheduled(cron = "0/5 * * * * ? ")
  20. public void job4SceneV3Download() throws Exception {
  21. sceneDownLoadService.process();
  22. }
  23. }