mode-schedule모듈
--npm install node-schedule --save(이거 세이브하는 이유는 package.json에 기록되게 하기 위함)
const schedule = require('node-schedule');
const date = new Date(2021,11,16,19,27,0);
console.log(date);
const j = schedule.scheduleJob(date,()=>{
console.log('no pain, no gain');
});
const rule = new schedule.RecurrenceRule();
rule.second = 1; //1분 지날때마나 저 격언이 나오는거임
const k = schedule.scheduleJob(rule, ()=>{
console.log('Laziness is nothing more than the habit of resting before you get tired');
});
cron 표현식
이 표현식으로 시간을 지정할 수 있다.