배치 스케줄러 타임존을 Asia/Seoul로 설정
This commit is contained in:
@@ -65,12 +65,18 @@ export class BatchSchedulerService {
|
|||||||
`배치 스케줄 등록: ${config.batch_name} (ID: ${config.id}, Cron: ${config.cron_schedule})`
|
`배치 스케줄 등록: ${config.batch_name} (ID: ${config.id}, Cron: ${config.cron_schedule})`
|
||||||
);
|
);
|
||||||
|
|
||||||
const task = cron.schedule(config.cron_schedule, async () => {
|
const task = cron.schedule(
|
||||||
logger.info(
|
config.cron_schedule,
|
||||||
`스케줄에 의한 배치 실행 시작: ${config.batch_name} (ID: ${config.id})`
|
async () => {
|
||||||
);
|
logger.info(
|
||||||
await this.executeBatchConfig(config);
|
`스케줄에 의한 배치 실행 시작: ${config.batch_name} (ID: ${config.id})`
|
||||||
});
|
);
|
||||||
|
await this.executeBatchConfig(config);
|
||||||
|
},
|
||||||
|
{
|
||||||
|
timezone: "Asia/Seoul", // 한국 시간 기준으로 스케줄 실행
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
this.scheduledTasks.set(config.id, task);
|
this.scheduledTasks.set(config.id, task);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user