[TEST] 배치 실행 테스트
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
package app.module.admin.usecase.schedule.autoSchedules.adapters.web;
|
package app.module.admin.usecase.schedule.autoSchedules.adapters.web;
|
||||||
|
|
||||||
import app.module.admin.usecase.batchLog.ports.application.domain.BatchLogType;
|
|
||||||
import app.module.admin.usecase.schedule.autoSchedules.ports.AutoSchedulesPortIn;
|
import app.module.admin.usecase.schedule.autoSchedules.ports.AutoSchedulesPortIn;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
@@ -31,38 +30,35 @@ public class AutoSchedulesController {
|
|||||||
*/
|
*/
|
||||||
@Scheduled(cron = "0 0 17 * * ?")
|
@Scheduled(cron = "0 0 17 * * ?")
|
||||||
public void fetchSmsAutoSend() {
|
public void fetchSmsAutoSend() {
|
||||||
|
try {
|
||||||
|
|
||||||
|
String host = java.net.InetAddress.getLocalHost().getHostName();
|
||||||
|
|
||||||
|
log.info("스케줄 실행 : fetchSmsAutoSend / {} / {} / {} / {}", host, this, + System.identityHashCode(this), Thread.currentThread().getName());
|
||||||
|
|
||||||
portIn.sendAutoSms();
|
portIn.sendAutoSms();
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 월초이월금 계산하여 등록
|
* 월초이월금 계산하여 등록
|
||||||
* 매월 16일 0시 1초에 실행되는 스케줄러
|
* 매월 16일 0시 1초에 실행되는 스케줄러
|
||||||
*/
|
*/
|
||||||
//@Scheduled(cron = "1 0 0 16 * *")
|
@Scheduled(cron = "1 0 0 16 * *")
|
||||||
@Scheduled(cron = "0 * 11,12 * * *")
|
|
||||||
public void fetchMonthlyCarryOver() {
|
public void fetchMonthlyCarryOver() {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
String host = java.net.InetAddress.getLocalHost().getHostName();
|
String host = java.net.InetAddress.getLocalHost().getHostName();
|
||||||
|
|
||||||
log.info("스케줄 실행: {} / {} / {} / {}", host, this, + System.identityHashCode(this), Thread.currentThread().getName());
|
log.info("스케줄 실행 : fetchMonthlyCarryOver / {} / {} / {} / {}", host, this, + System.identityHashCode(this), Thread.currentThread().getName());
|
||||||
|
|
||||||
portIn.monthlyCarryOver();
|
portIn.monthlyCarryOver();
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
log.error(e.getMessage(), e);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Scheduled(cron = "0 * 11,12 * * *")
|
|
||||||
public void fetchTest() {
|
|
||||||
try {
|
|
||||||
String host = java.net.InetAddress.getLocalHost().getHostName();
|
|
||||||
|
|
||||||
log.info("스케줄 실행: {} / {} / {} / {}", host, this, + System.identityHashCode(this), Thread.currentThread().getName());
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user