# thideyetask

> Task Scheduler is a simple JavaScript package that allows you to schedule and manage recurring tasks within your Node.js applications. It provides an easy-to-use interface for scheduling tasks to run at specified intervals.

Latest version **1.0.1** (published 2024-04-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install thideyetask
pnpm add thideyetask
yarn add thideyetask
bun add thideyetask
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2024-04-13 |
| First published | 2024-04-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | superhobot |

## Links

- npm: https://www.npmjs.com/package/thideyetask
- Repository: https://github.com/superh0b0/thideyetask
- Homepage: https://github.com/superh0b0/thideyetask#readme
- Issues: https://github.com/superh0b0/thideyetask/issues
- npm.io page: https://npm.io/package/thideyetask

## Dependencies (2)

- [packages](https://npm.io/package/packages.md) ^0.0.8
- [jnlwlogger](https://npm.io/package/jnlwlogger.md) ^0.0.1

## Recent versions

- 1.0.1 (latest) — 2024-04-13
- 1.0.0 — 2024-04-13

## README

# Task Scheduler

## Description

Task Scheduler is a simple JavaScript package that allows you to schedule and manage recurring tasks within your Node.js applications. It provides an easy-to-use interface for scheduling tasks to run at specified intervals.

## Installation

To install the Task Scheduler package, you can use npm:

```bash
npm install thideyetask
```

## Usage

1. Import the `thideyetask` class into your Node.js application:

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

2. Create a new instance of `TaskScheduler`:

```javascript
const scheduler = new TaskScheduler();
```

3. Define your tasks as functions:

```javascript
const task1 = () => {
  console.log('Task 1 executed at', new Date());
};

const task2 = () => {
  console.log('Task 2 executed at', new Date());
};
```

4. Schedule tasks to run at specified intervals using the `scheduleTask` method:

```javascript
scheduler.scheduleTask(task1, 2000); // Task 1 every 2 seconds
scheduler.scheduleTask(task2, 5000); // Task 2 every 5 seconds
```

5. Tasks will run indefinitely until explicitly cancelled. To cancel all tasks, use the `cancelAllTasks` method:

```javascript
scheduler.cancelAllTasks();
```

## Example

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

const scheduler = new TaskScheduler();

const task1 = () => {
  console.log('Task 1 executed at', new Date());
};

const task2 = () => {
  console.log('Task 2 executed at', new Date());
};

scheduler.scheduleTask(task1, 2000);
scheduler.scheduleTask(task2, 5000);

// Tasks will run indefinitely until explicitly cancelled
// To cancel all tasks
// scheduler.cancelAllTasks();
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

---
_Source: https://npm.io/package/thideyetask · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
