pcron
pcron is a periodical scheduler expression tool inspired by fcron
Example
PT1h 2020 * 21-22 * * *
Like the example above, it means "from 21 through 22 of every month in 2020, the scheduler will be executed every 1 hour".
For more example, see test
Installation
yarn add pcron
or
npm i pcron
Usage
;; ;// timestamp is a unix timestamp, a current timestamp will be used by default if you omit this parameter;; // you will get a dayjs object represent 2020-09-23T00:00:01; // you will get a dayjs object represent 2020-09-23T00:01:00; // you will get a dayjs object represent 2020-09-23T00:01:01; // you will get null
Changelog
License
MIT