Releases: P4sca1/cron-schedule
Releases · P4sca1/cron-schedule
v2.2.0
v2.1.0 Add methods to iterate over next and previous dates
- Slightly improve performance of the interval based scheduler.
- Add methods to iterate over next and previous dates:
cron.getNextDatesIterator
andcron.getPrevdatesIterator()
v2.0.2
v2.0.1
v2.0.0 Interval based scheduler
- Renamed
Schedule
toCron
- New
IntervalBasedScheduler
- Moved
setTimeout
,setInterval
andclearTimeoutOrInterval
toTimerBasedScheduler
See README.md
for instructions on how to use the new scheduler.
Quick migration guide:
// v1.x
import { parseCronExpression } from 'cron-schedule'
const schedule = parseCronExpression('* * * * *')
schedule.setTimeout(fn)
schedule.setInterval(fn)
schedule.clearTimeoutOrInterval(id)
// v2.x
import { parseCronExpression, TimerBasedScheduler as scheduler } from 'cron-schedule'
const cron = parseCronExpression('* * * * *')
scheduler.setTimeout(cron, fn)
scheduler.setInterval(cron, fn)
scheduler.clearTimeoutOrInterval(id)