0.0.1 • Published 5 years ago
alarms v0.0.1
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. * Ifdailyistrue, the alarm will repeat everyday.verbose:boolean, default:false. * Ifverboseistrue, it will output some log when the function is executed.
TODO lists
- Alarms can be canceled.
- Custom repeat period.
- Parameter can be a
Dateobject.
0.0.1
5 years ago