2.2.0 • Published 9 years ago

node-task-scheduler v2.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

node-task-scheduler Build Status npm version Coverage Status

A Task scheduler for node.js, with cron-syntax, specific execution intervals and due dates.

Instalation

npm install --save node-task-scheduler

Example usage

var nts=require('node-task-scheduler');

var scheduler = nts.init({
  // add some parameters! Check wiki for details
});

global.scheduler = scheduler; //available to entire application

//starting previous tasks
ts.start(function(taskNames){
  console.log("Previous tasks loaded:");
  taskNames.forEach(function(taskName){
    console.log(taskName);
  });
});

...

//adding task, to be executed each minute, until endDate
scheduler.addTask('hello', {hello: 'world'}, function(args, callback){
  console.log("Hello from hello! ", "ARGS: "+args.hello);
  callback();
}, "0 * * * * *", endDate);

...

//removing the task
scheduler.removeTask('hello', function(){
  console.log("Task 'hello' removed.");
});

Wiki

Yes, we have a wiki! Click here for details.

License

MIT

2.2.0

9 years ago

2.1.0

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.1.0

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago