Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tasks-manager

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tasks-manager

Simple and useful tasks manager for nodejs.

  • 0.2.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 27 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc