【发布时间】:2016-01-11 19:56:12
【问题描述】:
我打算使用node-schedule设置预约提醒推送通知如下:
var schedule = require('node-schedule');
var date = req.body.date; // Date for reminder from client request
var j = schedule.scheduleJob(date, function(){
// Send push notification
});
现在我知道你可以通过调用 cancel() 来取消事件:
j.cancel()
但是,如果来自客户端的用户决定将约会更改为不同的日期,我如何参考该特定作业以取消?
提前感谢您的帮助!
【问题讨论】: