【发布时间】:2018-10-07 14:12:50
【问题描述】:
在初始运行时,它会运行 app.js,但是会在间隔时跳过它。我在这里可能做错了什么?
var cron = require('node-cron');
cron.schedule('*/10 * * * * *', function(){
var shell = require('./app.js');
commandList = [
"node app.js"
]
console.log('Bot successfully executed');
});
日志:
ec2-user:~/environment $ node forever.js
Bot successfully executed
You have already retweeted this Tweet.
You have already retweeted this Tweet.
Bot successfully executed
Bot successfully executed
Bot successfully executed
Bot successfully executed
Bot successfully executed
Bot successfully executed
Bot successfully executed
Bot successfully executed
【问题讨论】:
标签: javascript node.js bots node-cron