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.

multiple_jobs.js 379B

123456789101112131415
  1. const CronJob = require('../lib/cron.js').CronJob;
  2. console.log('Before job instantiation');
  3. const job = new CronJob('*/5 * * * * *', function() {
  4. const d = new Date();
  5. console.log('First:', d);
  6. });
  7. const job2 = new CronJob('*/8 * * * * *', function() {
  8. const d = new Date();
  9. console.log('Second:', d);
  10. });
  11. console.log('After job instantiation');
  12. job.start();
  13. job2.start();