cron-runner
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -27,3 +27,2 @@ var inherit = require('inherit'), | ||
this._options = options; | ||
this._logger = Logger.createLogger(module); | ||
@@ -38,2 +37,5 @@ if (!this._options) { | ||
} | ||
typeof o === 'string' && (o = { pattern: o }); | ||
if (!o.pattern) { | ||
@@ -43,2 +45,3 @@ throw new Error('Cron pattern was not set'); | ||
this._logger = Logger.setOptions(options['logger']).createLogger(module); | ||
this._state = this._STATE.IDLE; | ||
@@ -45,0 +48,0 @@ |
{ | ||
"name": "cron-runner", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
@@ -13,2 +13,4 @@ # cron-runner | ||
[RUSSIAN DOCUMENTATION](./README.ru.md) | ||
## Usage | ||
@@ -41,7 +43,15 @@ | ||
``` | ||
You can receive more details about cron patterns configuration [here](https://www.npmjs.com/package/cron). | ||
### API | ||
#### constructor | ||
You should call constructor of cron-runner module with options object (required). | ||
The fields of this object should be: | ||
* `cron` - simple string or object with field `cron` which contains cron pattern string value. | ||
You can receive more details about cron patterns [here](https://www.npmjs.com/package/cron). | ||
* `logger` - logger configuration. This is optional configuration field for | ||
[logger](https://github.com/bem-site/logger) initialization. | ||
#### setIdle | ||
@@ -84,3 +94,8 @@ Switches state of runner to IDLE state. You can call it after your custom execution code for unlock | ||
Special thanks to: | ||
* Nikolay Ilchenko (http://github.com/tavriaforever) | ||
* Konstantinova Gela (http://github.com/gela-d) | ||
Maintainer @tormozz48 | ||
Please send your questions and proposals to: tormozz48@gmail.com |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
81505
7
102
99