| | |
| | | package com.gkhy.safePlatform.targetDuty.schedule; |
| | | |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetTypeService; |
| | | import com.gkhy.safePlatform.targetDuty.service.baseService.TargetTypeBaseService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | |
| | | public class KeepAliveRobot { |
| | | |
| | | @Autowired |
| | | private TargetTypeService targetTypeService; |
| | | private TargetTypeBaseService targetTypeBaseService; |
| | | |
| | | // 30m |
| | | @Scheduled(cron = "0 0/30 * * * ?") |
| | | public void keepAlive(){ |
| | | // |
| | | // targetTypeService.getById(-1L); |
| | | |
| | | targetTypeBaseService.getById(1L); |
| | | } |
| | | |
| | | } |