plugins.scheduler.addJob vs plugins.scheduler.addCronJob

Questions, tips and tricks and techniques for scripting in Servoy

plugins.scheduler.addJob vs plugins.scheduler.addCronJob

Postby david » Mon Dec 18, 2006 9:24 pm

Any reason to use one over the other? I can schedule all the same stuff using either function....
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1724
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Postby ROCLASI » Mon Dec 18, 2006 9:36 pm

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.
Robert Ivens
ROCLASI Software Solutions / JBS Group, Partner
SAN Developer / Servoy Valued Professional / Servoy Certified Developer
Twitter: @roclasi / @servoyforge
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5218
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Postby david » Mon Dec 18, 2006 9:43 pm

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?
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1724
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Postby IT2Be » Mon Dec 18, 2006 9:44 pm

Everything is gone when the solution stops D...
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4763
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Postby ROCLASI » Mon Dec 18, 2006 9:45 pm

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.
Robert Ivens
ROCLASI Software Solutions / JBS Group, Partner
SAN Developer / Servoy Valued Professional / Servoy Certified Developer
Twitter: @roclasi / @servoyforge
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5218
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re:

Postby huber » Fri Mar 06, 2015 3:36 pm

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,
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 257
Joined: Mon May 14, 2012 11:31 pm


Return to Methods

Who is online

Users browsing this forum: No registered users and 3 guests

cron