In my case, if multiple jobs are scheduled at the exactly the same time, some might be skipped. By looking at the code, I see that each task has a 1000-millisecond interval callback all the times, and at each call, if the current time matches, the job runs. Sometimes, when multiple jobs are called at the same second, and plus slow CPU or heavy task or slow nodejs or the callback happens to be at the very end of that second, some of them might skipped the second 0 (if the second is not set, it will default to 0) and they will not run. In other words, this mechanism is very unreliable.
I don't see any quick fix for this. I think the best way is the node-scheduler way, which calculate the next running time for each task and set only one callback (instead of call every second which consumes CPU).
If you are using this for serious jobs like the cron replacement in a server, I highly recommend you to switch another lib. I think the author should state this in the README since it might cause serious problems and hard to find out why.
In my case, if multiple jobs are scheduled at the exactly the same time, some might be skipped. By looking at the code, I see that each task has a 1000-millisecond interval callback all the times, and at each call, if the current time matches, the job runs. Sometimes, when multiple jobs are called at the same second, and plus slow CPU or heavy task or slow nodejs or the callback happens to be at the very end of that second, some of them might skipped the second 0 (if the second is not set, it will default to 0) and they will not run. In other words, this mechanism is very unreliable.
I don't see any quick fix for this. I think the best way is the node-scheduler way, which calculate the next running time for each task and set only one callback (instead of call every second which consumes CPU).
If you are using this for serious jobs like the cron replacement in a server, I highly recommend you to switch another lib. I think the author should state this in the README since it might cause serious problems and hard to find out why.