声明: 转载请注明出处
1. 导入
import later from 'later';
2. 定时任务
later.date.localTime(); //设定时区
//每分钟的第5秒启动一次
const sched = later.parse.recur().on(5).second()
const timer = later.setInterval(function() {
consoleLog();
}, sched);
function consoleLog(){
console.log('hello world!');
}