123456789101112131415161718192021222324252627 |
- package com.fdkankan.scene.schedule;
- import com.fdkankan.scene.service.ISceneAsynOperLogService;
- import lombok.extern.log4j.Log4j2;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.cloud.context.config.annotation.RefreshScope;
- import org.springframework.scheduling.annotation.Scheduled;
- import org.springframework.stereotype.Component;
- @RefreshScope
- @Log4j2
- @Component
- public class ScheduleJob {
- @Autowired
- private ISceneAsynOperLogService sceneAsynOperLogService;
- /**
- * 每天凌晨一点执行
- */
- @Scheduled(cron="0 0 1 * * ?")
- public void cleanDownloadPanorama() {
- log.info("定时清除全景图压缩包开始");
- sceneAsynOperLogService.cleanDownloadPanorama();
- log.info("定时清除全景图压缩包完毕");
- }
- }
|