node-routine-runner
v1.0.4
Published
A utility package for running promised code a given # of times at a set interval.
Downloads
1
Readme
node-routine-runner
A utility package for running promised code a given # of times at a set interval.
Prerequisities
No prerequisities
Installing
Install using npm
npm install node-routine-runner
Using
Importing in ES6
import { BaseRoutine, RoutineRunner } from 'node-routine-runner';
Extend BaseRoutine overriding the execute with your own promise
class TestRoutine extends BaseRoutine {
execute() {
return restClient.send();
}
}
Initialize new RoutineRunner and execute
new RoutineRunner(TestRoutine, 5, 2000).start().then(() => {
console.log('Complete');
})
Built With
- Javascript ES6
- Node
- Babel
- Mocha, Sinon, Chai
Authors
- Steven Haddix
License
This project is licensed under the ISC License