refactor(schedules): use explicit array for hour range in event watch

Replace the nodeSchedule.Range object with a literal array for the
hour parameter in the event watch schedule. This makes the scheduled
hours (7 to 22) more explicit and easier to read at a glance, while
maintaining the exact same execution logic.
This commit is contained in:
kyuuseiryuu 2026-03-25 01:10:59 +09:00
parent 0cb7c087fc
commit e37f82f787

View File

@ -72,7 +72,7 @@ export class EventWatchSchedule implements Schedule {
start() { start() {
const job = nodeSchedule.scheduleJob('event-watch', { const job = nodeSchedule.scheduleJob('event-watch', {
minute: [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55], minute: [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55],
hour: new nodeSchedule.Range(7, 22), hour: [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22],
}, () => this.watchEvents()); }, () => this.watchEvents());
this.#job = job; this.#job = job;
console.debug('Start schedule: %s, next run at %s', job.name, dayjs.tz(job.nextInvocation(), 'Asia/Tokyo').format('YYYY-MM-DD HH:mm:ss')); console.debug('Start schedule: %s, next run at %s', job.name, dayjs.tz(job.nextInvocation(), 'Asia/Tokyo').format('YYYY-MM-DD HH:mm:ss'));