bunkat / later

A javascript library for defining recurring schedules and calculating future (or past) occurrences for them. Includes support for using English phrases and Cron schedules. Works in Node and in the browser.
http://bunkat.github.io/later/
MIT License
2.42k stars 244 forks source link

later setInterval can't fire time? #222

Open hetz opened 6 years ago

hetz commented 6 years ago

Please help me. I try every is ok , but I try time.

var later = require("later")
// var sched = later.parse.recur().every(5).second();
var sched = later.parse.recur().on('11:59:50').time();
var t = later.setInterval(test, sched);

console.log('server machine time:',new Date());
function test() {
    console.log(new Date());
}

https://runkit.com/htz/later-setinterval-can-t-run-time