plugins.scheduler.addJob vs plugins.scheduler.addCronJob

Any reason to use one over the other? I can schedule all the same stuff using either function…

Hi David,

With AddCronJob you can use the cron way of scheduling (seconds, minutes, hours, day of week, day, month).
With AddJob you can only set the startdate, interval (ms), repeat count and the end date.
So if you need a timed scheduling you use addCronJob and if you just need a timely schedule you use the addJob.
So depending on your need you can use either one.

Ah k, makes sense. Another question for you: when the batch processor solution is stopped, are jobs and cronJobs automatically stopped as well? Or should a removeJob function be called on solution close?

Everything is gone when the solution stops D…

Hi David,

When you close the solution you stop all jobs that were added in that solution.
Makes sense because those jobs fire methods in that solution.

Hi Robert

As far as I understand, the endDate seconds should be greater than the startDate seconds to avoid the creation of multiple jobs. But how exactly is this related to each other?

Regards,