배치 스케줄러 타임존을 Asia/Seoul로 설정

This commit is contained in:
dohyeons 2025-12-08 10:34:37 +09:00
parent 7f296afc17
commit 2cc0a7b309
1 changed files with 12 additions and 6 deletions

View File

@ -65,12 +65,18 @@ export class BatchSchedulerService {
`배치 스케줄 등록: ${config.batch_name} (ID: ${config.id}, Cron: ${config.cron_schedule})`
);
const task = cron.schedule(config.cron_schedule, async () => {
logger.info(
`스케줄에 의한 배치 실행 시작: ${config.batch_name} (ID: ${config.id})`
);
await this.executeBatchConfig(config);
});
const task = cron.schedule(
config.cron_schedule,
async () => {
logger.info(
`스케줄에 의한 배치 실행 시작: ${config.batch_name} (ID: ${config.id})`
);
await this.executeBatchConfig(config);
},
{
timezone: "Asia/Seoul", // 한국 시간 기준으로 스케줄 실행
}
);
this.scheduledTasks.set(config.id, task);
} catch (error) {