JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 32612
  • Score
    100M100P100Q137139F
  • License MIT

Simplest task management promise-based module

Package Exports

  • taskr

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (taskr) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

taskr

Simplest task management promise-based module

Installation

npm install taskr --save

Usage

var tasks = require('taskr')(__dirname + '/task-handlers');

// will search for module 'task-handlers/my-awesome-task' considering it's exporting single function-worker
// then immediately run that function bypassing given parameter to it
// assumes, worker function returns promise
tasks.start('my awesome task', {param: value});

// will search for module 'task-handlers/every-minute' considering it's exporting single function-worker
// then will run it each minute
// (if previous call was not finished, then new one will be queued to be executed exactly after previous one)
tasks.schedule('0 * * * *', 'every minute');

// will run 'do that' immediately after 'after this'
tasks.pipe('after this', 'do that');

License

MIT