Answers for "node cron schedule specific time"

1

node cron schedule specific time

const CronJob = require('../lib/cron.js').CronJob;

console.log('Before job instantiation');
let date = new Date();
date.setSeconds(date.getSeconds()+2);
const job = new CronJob(date, function() {
	const d = new Date();
	console.log('Specific date:', date, ', onTick at:', d);
});
console.log('After job instantiation');
job.start();
Posted by: Guest on September-24-2021

Code answers related to "node cron schedule specific time"

Code answers related to "Javascript"

Browse Popular Code Answers by Language