代码如下。求指导。
var later = require('later');
later.date.localTime();
console.log("Now:"+new Date());
var basic = {h: [8,9,10,11,12,13,14,15,16,17], s: [0,15,30,45]};
var composite = [
basic,
{h: [18], m: [0]}
];
var exception = [
{dw: [6,7]}
];
later.date.localTime();
var schedule = {
schedules:composite,
exceptions:exception
};
later.date.localTime();
var sched = later.schedule(schedule),
//var sched = later.parse.recur().on(schedu),
t = later.setInterval(test, sched),
count = 5;
function test() {
console.log(new Date());
if(count <= 0) {
t.clear();
}
}