| | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | @Autowired |
| | | private WebSocketService webSocketService; |
| | | |
| | | @Value("${use.scheduler}") |
| | | private boolean bUseScheduler; |
| | | |
| | | // OWL ITS 관련자들에게 회원 가입 정보를 전달한다. |
| | | @Scheduled(cron = "0 0 17 * * *") |
| | | public void sendOwlManager() { |
| | | if (!bUseScheduler) { |
| | | return; |
| | | } |
| | | // OWL ITS 관련자들에게 회원 가입 정보를 전달한다. |
| | | this.userService.sendUserJoinStatisticsEmail(); |
| | | |
| | |
| | | // 이슈와 연결되지 않은 첨부파일 삭제 - 이슈 생성, 수정에서 에디트 창에 첨부했다가 저장하지 않은 파일들... 새벽 1시 30분에 실행 |
| | | @Scheduled(cron = "0 30 01 * * *") |
| | | public void deleteAttachedFileNotIdAndReservationIssue() { |
| | | if (!bUseScheduler) { |
| | | return; |
| | | } |
| | | // 이슈와 연결되지 않은 첨부파일 삭제 |
| | | this.attachedFileService.deleteAttachedFileNotId(); |
| | | // 이슈 예약 발생한 항목을 찾아 이슈를 다시 생성 상태로 변경한다. |
| | |
| | | // 이메일 예약 발송 - 사용자가 설정한 알림 시간에 시스템에서 일어난 이벤트를 이메일로 발송한다. - 매시간 30분에 실행 |
| | | @Scheduled(cron = "0 0/30 * * * *") |
| | | public void smartEmailSystem() { |
| | | if (!bUseScheduler) { |
| | | return; |
| | | } |
| | | // 예약된 이메일 발송 |
| | | this.systemEmailService.reservationSendEmail(); |
| | | } |
| | |
| | | // 이메일 실시간 발송 - 1분마다 실행 |
| | | @Scheduled(cron = "0 * * * * *") |
| | | public void realTimeEmailSystem() { |
| | | if (!bUseScheduler) { |
| | | return; |
| | | } |
| | | // 실시간 이메일 발송 |
| | | this.systemEmailService.realTimeSendEmail(); |
| | | } |