【发布时间】:2015-09-06 17:56:07
【问题描述】:
我正在使用CronJob。执行myFunction
时遇到错误怎么办var CronJob = require('cron').CronJob;
var job = new CronJob('00 30 11 * * 1-5', function myFunction() {
//Do something
}, function () {
/* This function is executed when the job stops */
},
true, /* Start the job right now */
timeZone /* Time zone of this job. */
);
【问题讨论】:
-
视情况而定。什么样的错误?
-
以查询数据库时出错为例
标签: node.js error-handling callback cron-task