batch processor and scheduler jobs

The forum to discuss the Headless version of Servoy. Web, Java and Servlet development questions can all be posted here.

batch processor and scheduler jobs

Postby Thomas Parry » Tue Apr 12, 2011 8:49 pm

If a smart client schedules cron jobs via the scheduler plugin is it true that a batch processor when asking for a list of all jobs via this same plugin will receive an empty result? I ask because that appears to be what I get. The wiki says that a job is executed only if the smart client that scheduled it is still active.

Is this a good design for the batch processor:
The smart clients that want a job to be scheduled "put" this job in a table (called job_schedule for example).
The batch processor onOpen method would rebuild the cron jobs from this job_schedule table (and therefore be the owner).
Assuming the batch processor still is running when the scheduler invokes the method in the batch processor it actually does run.


Servoy 5.2.7
Tom Parry
Prospect IT
Java/C++/Servoy/Jasper Reports/Simulation/Service Applications
http://www.prospect-saas.biz
Thomas Parry
 
Posts: 498
Joined: Thu Jan 10, 2008 8:48 pm
Location: Ottawa, Canada

Re: batch processor and scheduler jobs

Postby Harjo » Tue Apr 12, 2011 9:56 pm

Thomas Parry wrote:If a smart client schedules cron jobs via the scheduler plugin is it true that a batch processor when asking for a list of all jobs via this same plugin will receive an empty result? I ask because that appears to be what I get. The wiki says that a job is executed only if the smart client that scheduled it is still active.

Is this a good design for the batch processor:
The smart clients that want a job to be scheduled "put" this job in a table (called job_schedule for example).
The batch processor onOpen method would rebuild the cron jobs from this job_schedule table (and therefore be the owner).
Assuming the batch processor still is running when the scheduler invokes the method in the batch processor it actually does run.


Servoy 5.2.7


Hi Parry, indeed, the smartclient that creates the cronjob is the owner, so a batchprocessor, asking for the same list, would not work, because that's another client!
and indeed, let the batchprocessor also create the cronjob, at startup (or loop every 5 minutes over your job schedule table) and look for changes
Harjo Kompagnie
Direct ICT / Servoy Hosting / ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
User avatar
Harjo
 
Posts: 4268
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: batch processor and scheduler jobs

Postby Thomas Parry » Tue Apr 12, 2011 11:26 pm

@Harjo,
Thanks that confirms my suspicions.
Is there a (Servoy provided) way to get at the system view of cron jobs rather than just those created by either the batch processor or smart clients? Any 3rd party mechanism (other than creating my own plugin of course).
Tom Parry
Prospect IT
Java/C++/Servoy/Jasper Reports/Simulation/Service Applications
http://www.prospect-saas.biz
Thomas Parry
 
Posts: 498
Joined: Thu Jan 10, 2008 8:48 pm
Location: Ottawa, Canada

Re: batch processor and scheduler jobs

Postby Harjo » Tue Apr 12, 2011 11:36 pm

Not that I know of!
Harjo Kompagnie
Direct ICT / Servoy Hosting / ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
User avatar
Harjo
 
Posts: 4268
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: batch processor and scheduler jobs

Postby jcompagner » Wed Apr 13, 2011 10:27 am

There can't be any system application that will show you the smart clients cron jobs and the batch client cron jobs in one view.
Because those are 2 machines.

Batch processors run on the server and have there there own scheduler (also those are separated from each other by the default methods, but we could add a function that would give back all the jobs of all the batch processors)

But a smart client runs on the client and has its own scheduler running there, that has nothing to do with the server.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 7971
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: batch processor and scheduler jobs

Postby Thomas Parry » Wed Apr 13, 2011 3:52 pm

@Johan,
Yes I realize that the cron jobs created by smart clients would be on separate machines, hence my question. That would be an interesting challenge for someone to go query all the clients connected in Servoy apps and get their cron jobs to "manage". For web clients their cron jobs (if any) would be acessible.

Should I ask for a feature to get all cron jobs on the server batch processor/headless clients (assuming technically feasible)?
Tom Parry
Prospect IT
Java/C++/Servoy/Jasper Reports/Simulation/Service Applications
http://www.prospect-saas.biz
Thomas Parry
 
Posts: 498
Joined: Thu Jan 10, 2008 8:48 pm
Location: Ottawa, Canada

Re: batch processor and scheduler jobs

Postby jcompagner » Wed Apr 13, 2011 4:17 pm

I think it is possible to update the scheduler plugin to have a method to display all the jobs that are currently there on this machine
For a smart client this will always be the same as only for his, but for a web/headless this would mean all of them shared over all clients running on that server

you could add a feature request for this
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 7971
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: batch processor and scheduler jobs

Postby Thomas Parry » Wed Apr 13, 2011 8:29 pm

Feature request filed: 375718
Tom Parry
Prospect IT
Java/C++/Servoy/Jasper Reports/Simulation/Service Applications
http://www.prospect-saas.biz
Thomas Parry
 
Posts: 498
Joined: Thu Jan 10, 2008 8:48 pm
Location: Ottawa, Canada


Return to Servoy Headless Client

Who is online

Users browsing this forum: No registered users and 1 guest