0.1.0 • Published 1 year ago

tshedpandapsy v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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.

0.1.0

1 year ago