1.0.3 • Published 3 years ago

unix-cron v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

unix-cron

Handle Unix format Crontab(eg: */30 [9-17]/2 1,2,3 * *)

usage

const cron = require("unix-cron");

const c = new cron("*/30 [9-17]/2 1,2,3 * *");

// check if a Date match this cron
c.isMatchDate(new Date());

// get next Date of the cron
c.next();
c.next(new Date("2021-01-01 1:1:0"));

// schedule missions
c.schedule(() => {
  // do stuff
});
1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago