tshedpandapsy

0.1.0 • Public • Published

My Task Scheduler

A simple and lightweight task scheduler package for Node.js applications.

Installation

You can install the package via npm:

npm install my-task-scheduler


## Usage

```javascript
const TaskScheduler = require('my-task-scheduler');

// Create a new instance of TaskScheduler
const scheduler = new TaskScheduler();

// Schedule a task to be executed after 5 seconds
const taskObject = scheduler.scheduleTask(() => {
    console.log('Task executed!');
}, 5000);

console.log('Task scheduled:', taskObject);

API

scheduleTask(task, delay)

Schedules a task to be executed after a specified delay.

  • task: The function to be executed as the task.
  • delay: The delay (in milliseconds) after which the task should be executed.

Returns an object representing the scheduled task.

License

TThis package is open source and available under the MIT License. LICENSE file for details.

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i tshedpandapsy

    Weekly Downloads

    0

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    2.63 kB

    Total Files

    3

    Last publish

    Collaborators

    • psychopandarian