0.2.10 • Published 4 years ago

tasks-manager v0.2.10

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Tasks Manager

Simple and useful tasks manager for nodejs.

const {loader} = require('task-manager');

loader();

Instalation

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js. Node.js 0.10 or higher is required.

If this is a brand new project, make sure to create a package.json first with the npm init command.

Installation is done using the npm install command:

$ npm install tasks-manager

Features

  • Autoloader of tasks
  • Async/Sync Tasks
  • Interval Time assignation
  • Execution after finish the previous execution
  • Balancers Logic
  • Dynamic Balancer
  • Process per task and balancer

Usage

Create a new file with name task.js in the root folder or subfolder with the follow structure:

const {Task} = require('tasks-manager');

module.exports = new Task({
  name: 'Greater',
  task: async function task(balancer) {
    console.log(`Hi, I'm a task with name ${this.name} and my name is ${balancer}`);
  },
  interval: 2000,
  balancers: ['John', 'Jane'],
});

In the index.js just add the loader

const {loader} = require('task-manager');

loader();

Now execute the code npm start or node index.js

0.2.10

4 years ago

0.2.9

4 years ago

0.2.8

4 years ago

0.2.7

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago