On initial run, it'll run app.js however, on interval it skips over it. What might I be doing wrong here?
var cron = require('node-cron');
cron.schedule('*/10 * * * * *', function(){
var shell = require('./app.js');
commandList = [
"node app.js"
]
console.log('Bot successfully executed');
});
Log:
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