alarms
v0.0.1
Published
A simple package that will execute the specified function at specified time
Downloads
13
Readme
Alarms
A simple alarm that will execute specified function at specified time.
Usage
const alarms = require('alarms')
alarms({ hour: 13, minute: 45, second: 17, daily: true, verbose: false }, () => console.log('Alarm!'))
Parameters
The first argument is the alarm setting, which should be a object contains:
hour
:number
, required.minute
:number
, required.second
:number
, default:0
.daily
:boolean
, default:false
.- If
daily
istrue
, the alarm will repeat everyday.
- If
verbose
:boolean
, default:false
.- If
verbose
istrue
, it will output some log when the function is executed.
- If
TODO lists
- Alarms can be canceled.
- Custom repeat period.
- Parameter can be a
Date
object.