
Security News
Meet the Socket Team at RSAC and BSidesSF 2025
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.
@coya/task-manager
Advanced tools
Scheduler for run tasks successively or simultaneously.
npm install @coya/task-manager
git clone https://github.com/Cooya/TaskManager
cd TaskManager
npm install // it will also install the development dependencies
npm run build
npm run example // run the example script in "examples" folder
const { TaskManager, Task } = require('@coya/task-manager');
const firstTask = new Task('firstTask', 10, function() {
console.log('hello');
return Promise.resolve();
});
const secondTask = new Task('secondTask', 5, function() {
console.log('hola');
return Promise.resolve();
});
const thirdTask = new Task('thirdTask', 2, function() {
console.log('failure');
return Promise.reject();
});
const taskManager = new TaskManager();
taskManager.end(function() {
console.log('All tasks have been stopped, task manager shutted down.');
});
taskManager.processAsynchronousTasks([firstTask, secondTask, thirdTask]);
Process tasks list successively, it means that tasks are executed one by one. The following task is executed once the previous one is done.
Parameter | Type | Description | Default value |
---|---|---|---|
taskList | array | list of objects implementing or inheriting the Task class | none |
Process tasks list simultaneously, it means that tasks are executed in the same time (using setTimeout()). It is different from setInterval() because the timer is launched after the task has been processed.
Parameter | Type | Description | Default value |
---|---|---|---|
taskList | array | list of objects implementing or inheriting the Task class | none |
The Task class, and so its constructor, contains three fields :
FAQs
Scheduler for run tasks successively or simultaneously
The npm package @coya/task-manager receives a total of 18 weekly downloads. As such, @coya/task-manager popularity was classified as not popular.
We found that @coya/task-manager demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.
Security News
Biome's v2.0 beta introduces custom plugins, domain-specific linting, and type-aware rules while laying groundwork for HTML support and embedded language features in 2025.
Security News
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.