1
我正在使用CronJob。如果我执行myFunction的时候得到一个错误,我应该怎么办CronJob执行功能中的处理错误
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. */
);
这取决于。什么样的错误? –
查询数据库时出错 –