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:
parent
5ab0d9d188
commit
8dff4009bf
@ -58,7 +58,7 @@ export class EventWatchSchedule implements Schedule {
|
|||||||
start() {
|
start() {
|
||||||
const schedule = nodeSchedule.scheduleJob('event-watch', {
|
const schedule = 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: '7-23',
|
hour: new nodeSchedule.Range(7, 23),
|
||||||
}, () => this.watchEvents());
|
}, () => this.watchEvents());
|
||||||
console.debug('Start schedule:', schedule.name);
|
console.debug('Start schedule:', schedule.name);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user