node-schedule 定时器

Others 2018-06-28 02:42:31 2018-06-28 02:42:31 2326 次浏览

const schedule = require('node-schedule');

const rule = new schedule.RecurrenceRule();

schedule.scheduleJob("*/2 * * * * * *", () => {
    console.log("11");

});

每隔两秒调用一次