sancronos-validator
About
Cron expression validator
Settings
Install sancronos-validator
$ npm install sancronos-validator
Use
Accepts clasic crontab
x x x x x
┬ ┬ ┬ ┬ ┬
│ │ │ │ │
│ │ │ │ │
│ │ │ │ └───── day of week (0 - 7, - * /) (0 or 7 is sunday)
│ │ │ └────────── month (1 - 12 , - * /)
│ │ └─────────────── day of month (1 - 31 , - * /)
│ └──────────────────── hour (0 - 23 , - * /)
└───────────────────────── minutes (0 - 59 , - * /)
Accepts extended crontab
x x x x x x x
┬ ┬ ┬ ┬ ┬ ┬ ┬
│ │ │ │ │ │ │
│ │ │ │ │ │ └ year (1900 - 3000 , - * /) optional
│ │ │ │ │ └───── day of week (0 - 7 , - * / L #) (0 or 7 is sunday)
│ │ │ │ └────────── month (1 - 12 , - * /)
│ │ │ └─────────────── day of month (1 - 31 , - * / L W)
│ │ └──────────────────── hour (0 - 23 , - * /)
│ └───────────────────────── minutes (0 - 59 , - * /)
└────────────────────────────── seconds (0 - 59 , - * /) optional
But... who can use sancronos-validator
?
Answer: Everyone!
For Promise lovers
const sancronos = ;//..sancronos;
For callback lovers
const sancronos = ;//..sancronos;
For sync lovers
const sancronos = ;//..let crontab = sancronos;//Do something with your crontab//Be aware that in case it's invalid, it will throw an error.
See test/
for more details.
Changelog
1.2.0 (18-07-2017)
- Added callbacks
- Added sync
1.0.1 (11-07-2017)
- README with examples.
1.0.0 (11-07-2017)
Start