节点计划每月呼叫

时间:2018-06-11 04:46:55

标签: javascript node.js cron scheduled-tasks

此功能是否每月仅在12

运行一次
const schedule = require("node-schedule");
 var rule = new schedule.RecurrenceRule();
 rule.month = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
 rule.hour = 12;
 rule.minute = 0;
 const handleMonthyFunction = () => console.log("Monthly");
 var j = schedule.scheduleJob(rule, handleMonthyFunction);

0 个答案:

没有答案