Page 1 of 1

plugins.scheduler.addJob vs plugins.scheduler.addCronJob

PostPosted: Mon Dec 18, 2006 9:24 pm
by david
Any reason to use one over the other? I can schedule all the same stuff using either function....

PostPosted: Mon Dec 18, 2006 9:36 pm
by ROCLASI
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.

PostPosted: Mon Dec 18, 2006 9:43 pm
by david
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?

PostPosted: Mon Dec 18, 2006 9:44 pm
by IT2Be
Everything is gone when the solution stops D...

PostPosted: Mon Dec 18, 2006 9:45 pm
by ROCLASI
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.

Re:

PostPosted: Fri Mar 06, 2015 3:36 pm
by huber
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,