Answers for "node cron every second"

0

node cron every second

This worked for me -

    cron.schedule("*/10 * * * * *", function() {
      console.log("running a task every 10 second");
    });
Hope this helps someone.

Reference - https://support.acquia.com/hc/en-us/articles/360004224494-Cron-time-string-format
Posted by: Guest on March-09-2021
0

Node -Cron Run every minute

var cron = require('node-cron');

var task = cron.schedule('* * * * *', () =>  {
  console.log('will execute every minute until stopped');
});

task.stop();
Posted by: Guest on May-28-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language