Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

run_at_specific_date.js 334B

1234567891011
  1. const CronJob = require('../lib/cron.js').CronJob;
  2. console.log('Before job instantiation');
  3. let date = new Date();
  4. date.setSeconds(date.getSeconds()+2);
  5. const job = new CronJob(date, function() {
  6. const d = new Date();
  7. console.log('Specific date:', date, ', onTick at:', d);
  8. });
  9. console.log('After job instantiation');
  10. job.start();