node-cron: Do not start work immediately

Why do not start working without delay time (start).

var job1 = new CronJob({
    cronTime: '* 5 * * * *',
    onTick: function () {
        console.log(1);
    },
    start: true
});
job1.start();


var job2 = new CronJob('* 5 * * * *', function(){
        console.log(1);
    },
    true
);

It does not work.

How to run cron immediately after running the script?

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 15 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Sorry this took so long. I’ve been unable to do anything side project related for a bit. Hope this helps. I pushed another commit which makes the option name more clear. That should be available in master. I’ll try to release something soonish, once I’ve had a chance to take care of a few other issues.