Pure JavaScript library for converting natural English phrases into Cron expressions
npm install @darkeyedevelopers/natural-cron.js#### Browser
#### NodeJS
* Install package with...
npm install @darkeyedevelopers/natural-cron.js
* Import with require() & call getCronString() whenever required...
var getCronString = require('@darkeyedevelopers/natural-cron.js');
var cron = getCronString('every day at 2:55pm');
getCronString() function.| Parameter | Type | Default value | Description |
| --- | --- | --- | --- |
| Input string | String | | Required. English phrase that has to be
converted to corresponding Cron expression |
| Output pattern | String | 'MIN HOR DOM MON WEK YER' | Optional. Specifies the output pattern in
which cron expression should be generated.
MIN => Minutes
HOR => Hours
DOM => Day of Month
MON => Month(s)
WEK => Weekday(s)
YER => Year
Combine one or more of the above to form
result pattern. Checkout the examples
below to understand better. |
55 2 3 JAN-AUG ? *3 JAN-AUG *3 * JAN-AUG 2{3) some text JAN-AUG :)*
Do you want to contribute ? Checkout CONTRIBUTING.md