Kala client for Node.js
How to use
npm install kala-node
const Kala = client = 'https://wherever-your-kala-is-at.com/api/v1' clientclientclientclientclientclientclientclient
There's a helper to generate the schedule
string:
times: 20 // To run this 20 times start: // Starting now (just an example – this will actually fail) interval: 'PT15M' // In 15 minutes after job creation // 'R20/2017-10-15T17:15:43.238Z/PT15M'
Pass null
times to run a job only once:
let start = start // In 4 hours times: null // Only once start: start interval: 'PT1M' // After 1 minute
Testing
Requirements
- Docker
make test
Kala Client basic operations
✓ create a job
✓ retrieve a job
✓ retrieve all jobs
✓ deletes a job
✓ retrieve job stats
✓ start a job
✓ enable a job
✓ retrieve stats
✓ delete all jobs (44ms)
Schedule
✓ should accept either three params or an object
✓ should accept null for the `times` param
11 passing (188ms)
Author
Written by Mario Álvarez