# l-timing

> 定时一个指定24小时时间的事件 Schedule an event for a specified 24-hour time

Latest version **1.0.0** (published 2023-01-31) · ISC license · 0 weekly downloads

## Install

```sh
npm install l-timing
pnpm add l-timing
yarn add l-timing
bun add l-timing
```

## 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.0 |
| Published | 2023-01-31 |
| First published | 2023-01-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | tntliao |

## Links

- npm: https://www.npmjs.com/package/l-timing
- npm.io page: https://npm.io/package/l-timing

## Recent versions

- 1.0.0 (latest) — 2023-01-31

## README

### 安装方法
````bash
npm i l-timing

yarn add l-timing
````
### 使用方法
当前库并非使用定时器每1秒检查是否到点执行，可以查看源码进行了解
````js
import timing from "l-timing"
/**
 * @param {number}   [hour = 12] 	        默认每天12点触发
 * @param {number}   [minute = 0]	        默认12:00分触发
 * @param {function} [callBack = ()=>{}] 	默认回调函数
 * @param {number}   [day = 1]	            默认超过指定时间会 + day(默认为1)天触发，当前即明天12点触发
 */
function callBack(){
    console.log("callBack")
}

timing(17,26,callBack) //每天17:26执行回调函数
timing(17,26,callBack,2) //如果过了今天，就在当前+2天17:26执行回调函数,相当于2天执行一次
````

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