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

This commit is contained in:
dohyeons
2025-12-08 10:34:37 +09:00
parent 7f296afc17
commit 2cc0a7b309

View File

@@ -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) {