cron-schedule

A zero-dependency cron parser and scheduler for Node.js, Deno and the browser.

MIT License

Downloads
261.3K
Stars
129
Committers
10

Bot releases are hidden (Show)

cron-schedule - v4.0.0 Latest Release

Published by P4sca1 over 1 year ago

4.0.0 (2023-03-30)

Bug Fixes

  • correctly parse weekday ranges that include sunday (#283) (2fb78b5)
  • specify types for legacy support (7288c13)

chore

  • drop support for node14 (d47ac6a)

Features

BREAKING CHANGES

  • If your environment does not support conditional exports, you have to import the schedulers from cron-schedule/dist/schedulers instead of cron-schedule/schedulers.

Signed-off-by: Pascal Sthamer [email protected]

  • Support for node14 is dropped,
    due to its EOL in the next month and missing ESM module support

Signed-off-by: Pascal Sthamer [email protected]

  • The package is now ESM only. A CommonJS or IIFE build is no longer provided.
  • The minimum required version of Node.js is now 14
  • utils are no longer exposed
  • schedulers are no longer exposed in the default entry point.
    Import them from cron-schedule/schedulers/interval-based.js and
    cron-schedule/schedulers/timer-based.js instead.

Signed-off-by: Pascal Sthamer [email protected]

cron-schedule - v4.0.0-next.3

Published by P4sca1 over 1 year ago

4.0.0-next.3 (2023-03-30)

Bug Fixes

  • correctly parse weekday ranges that include sunday (#283) (2fb78b5)
cron-schedule - v4.0.0-next.2

Published by P4sca1 over 1 year ago

4.0.0-next.2 (2023-03-30)

Bug Fixes

  • specify types for legacy support (7288c13)

BREAKING CHANGES

  • If your environment does not support conditional exports, you have to import the schedulers from cron-schedule/dist/schedulers instead of cron-schedule/schedulers.

Signed-off-by: Pascal Sthamer [email protected]

cron-schedule - v4.0.0-next.1

Published by P4sca1 over 1 year ago

4.0.0-next.1 (2023-03-30)

chore

  • drop support for node14 (d47ac6a)

Features

BREAKING CHANGES

  • Support for node14 is dropped,
    due to its EOL in the next month and missing ESM module support

Signed-off-by: Pascal Sthamer [email protected]

  • The package is now ESM only. A CommonJS or IIFE build is no longer provided.
  • The minimum required version of Node.js is now 14
  • utils are no longer exposed
  • schedulers are no longer exposed in the default entry point.
    Import them from cron-schedule/schedulers/interval-based.js and
    cron-schedule/schedulers/timer-based.js instead.

Signed-off-by: Pascal Sthamer [email protected]

cron-schedule - v3.0.6

Published by P4sca1 over 2 years ago

3.0.6 (2022-04-27)

Bug Fixes

  • cron.matchDate always returning true for day of month, when either weekday or day of month is unrestricted (#271) (8ebd6a6), closes #270 #270
cron-schedule - v3.0.5

Published by P4sca1 over 2 years ago

3.0.5 (2022-02-25)

Bug Fixes

  • relax allowed ranges to be compatible with linux spec (34466d4)
cron-schedule - v3.0.4

Published by P4sca1 almost 3 years ago

3.0.4 (2021-10-28)

Bug Fixes

  • include mjs files in npm build (1985874)
  • use unknown for error type (5623e65)
cron-schedule - v3.0.3

Published by P4sca1 about 3 years ago

3.0.3 (2021-08-17)

Bug Fixes

  • rename module file extension to .mjs (53993b1), closes #159
cron-schedule - v3.0.2

Published by P4sca1 over 3 years ago

3.0.2 (2021-06-25)

Bug Fixes

  • detect step values smaller than 1 (8f53df9), closes #134
cron-schedule - v3.0.1

Published by P4sca1 over 3 years ago

3.0.1 (2021-02-23)

Bug Fixes

  • fix files missing in npm bundle (00c173b)
cron-schedule - v3.0.0

Published by P4sca1 over 3 years ago

3.0.0 (2021-02-23)

Features

  • add error handling to tasks (375a6b8), closes #80
  • expose ECMAScript module (e73fadc)

BREAKING CHANGES

  • The third argument to IntervalBasedScheduler.registerTask is no longer isOneTimeTask.
    Instead it is an object where one attribute is the old isOneTimeTask parameter.

Signed-off-by: Pascal Sthamer [email protected]

cron-schedule - v2.2.4

Published by P4sca1 almost 4 years ago

2.2.4 (2020-11-21)

Bug Fixes

  • fix package.json exports (c172cdc)
cron-schedule - v2.2.3

Published by P4sca1 almost 4 years ago

2.2.3 (2020-11-20)

Bug Fixes

cron-schedule - v2.2.2

Published by P4sca1 almost 4 years ago

2.2.2 (2020-11-20)

Bug Fixes

cron-schedule - v2.2.1

Published by P4sca1 almost 4 years ago

2.2.1 (2020-11-20)

Bug Fixes

  • deps: regenerate yarn.lock (ef1e3fe)
cron-schedule - v2.2.0

Published by P4sca1 almost 4 years ago

2.2.0 (2020-11-20)

Features

  • expose ECMAScript module (fe730b6)
cron-schedule - v2.1.0 Add methods to iterate over next and previous dates

Published by P4sca1 almost 4 years ago

  • Slightly improve performance of the interval based scheduler.
  • Add methods to iterate over next and previous dates: cron.getNextDatesIterator and cron.getPrevdatesIterator()
cron-schedule -

Published by P4sca1 almost 4 years ago

  • Mark library as side effect free to support tree shaking
cron-schedule -

Published by P4sca1 almost 4 years ago

  • Improve compatiblity with bundlers like webpack.
cron-schedule - v2.0.0 Interval based scheduler

Published by P4sca1 almost 4 years ago

  • 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)