How to use cron.CronTime:
GitHub: stelace/stelace
186 187 188 189 190 191 192 193 194 195
} if (endDate < startDate) { throw new Error('Invalid dates') } const cronTime = new CronTime(pattern, timezone) let continueLoop = true const dates = [] let cronISODate = new Date(new Date(startDate).getTime() - 1) // start from `startDate` minus 1 millisecond
58
265
12
See more examples
How to use cron.CronJob:
202 203 204 205 206 207 208 209 210 211
super.registerEntity(false); } createCronjob(crontab) { const node = this.node; this.cronjob = new CronJob({ cronTime: crontab, onTick: () => { node.emit('input', {}); },
57
379
21
See more examples