Skip to content

Releases: P4sca1/cron-schedule

v2.2.0

20 Nov 20:43
f2af1d0
Compare
Choose a tag to compare

2.2.0 (2020-11-20)

Features

  • expose ECMAScript module (fe730b6)

v2.1.0 Add methods to iterate over next and previous dates

01 Nov 19:39
43b051a
Compare
Choose a tag to compare
  • Slightly improve performance of the interval based scheduler.
  • Add methods to iterate over next and previous dates: cron.getNextDatesIterator and cron.getPrevdatesIterator()

v2.0.2

30 Oct 20:58
3f5b7b7
Compare
Choose a tag to compare
  • Mark library as side effect free to support tree shaking

v2.0.1

30 Oct 14:02
a6901b8
Compare
Choose a tag to compare
  • Improve compatiblity with bundlers like webpack.

v2.0.0 Interval based scheduler

29 Oct 20:20
c0d1801
Compare
Choose a tag to compare
  • Renamed Schedule to Cron
  • New IntervalBasedScheduler
  • Moved setTimeout, setInterval and clearTimeoutOrInterval to TimerBasedScheduler

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)