How can we run the node-cron job in every 12 hours interval?
问题 I want to schedule the email after every 12 hrs , For that I have used node-cron. I have used the following code but its not giving me actual result, so please help me to resolve this issue, var job = new CronJob('0 0 */12 * * *', function(){ //email send code .. }); 回答1: Looking at the documentation the code should look like this: var cron = require('node-cron'); cron.schedule('0 0 */12 * * *', function(){ console.log('running a task every twelve hours'); }); Note: You need to have the app