refactor(schedules): use Range object for hour definition in EventWatchSchedule

Replace the string '7-23' with new nodeSchedule.Range(7, 23) for the hour configuration.
This change aligns the schedule definition with the explicit Range object type,
potentially improving type safety or ensuring compatibility with the underlying node-schedule library behavior.
This commit is contained in:
kyuuseiryuu 2026-03-24 17:45:09 +09:00
parent 5ab0d9d188
commit 8dff4009bf

View File

@ -58,7 +58,7 @@ export class EventWatchSchedule implements Schedule {
start() {
const schedule = nodeSchedule.scheduleJob('event-watch', {
minute: [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55],
hour: '7-23',
hour: new nodeSchedule.Range(7, 23),
}, () => this.watchEvents());
console.debug('Start schedule:', schedule.name);
}