Batch processors

Hi,

I would like to create a batch processor to backup my database everyday at 22:00.

I use the Scheduler plugin with this code:

plugins.scheduler.addCronJob(jobname, "* 00 22 * * ?", globals.Backup_DB,startDate,endDate,args)

When I strat this method from client, it’s work well but when I shutdown the client, this process is remove automatically.

How can I make a batch process which call a global method every day at 22:00 when all clients are close.

Thanks

You can start a batch processor on the Servoy server. This is a (headless) client running on that machine. See documentation and web admin pages.

BTW why don’t you perform a backup through the db tools of your database?

Because I’ve a form on Servoy where I change easily the frequency of backup.

With cronTimings I think it easy and I don’t know postgres rather well to do that with tool.

OK, I understand.

Well in that case you could use the batch processor.

Thanks It’s work fine :)

The only thing you need to know/realize that this ‘eats’ one client license!

Hi Pierre-andre,

Why use a Servoy cronjob to schedule a database backup when you can do it all on the server itself?
I assume you use pg_dump/pg_dumpall for the backup. Depending on the OS you are using you can setup a server cronjob to trigger this.
What OS are you using ?

Hi Robert, I asked almost the same question with the following reply

Because I’ve a form on Servoy where I change easily the frequency of backup.

With cronTimings I think it easy and I don’t know postgres rather well to do that with tool.

IT2Be:
Hi Robert, I asked almost the same question with the following reply

Because I’ve a form on Servoy where I change easily the frequency of backup.

With cronTimings I think it easy and I don’t know postgres rather well to do that with tool.

Ah!
But how do you access the form in a batchprocessor? ;)
An option would be to make it data(base) driven but that does mean you have to let it remove the current (Servoy) cronjob and load the new one.
I think a cronjob on the server is easier to change.

An option would be to make it data(base) driven but that does mean you have to let it remove the current (Servoy) cronjob and load the new one.

Excactly what I thought of. Starting and stopping the cronjob is very easy because you already know the name.

I don’t really agree it is necessarily easier to create a cronjob on the server. that depends on rights that you want/can give to the user that is allowed to change these settings.
I do agree in general that it would be easier/more flexible/more controllable to let the appropriate db tools do the job.

But how do you access the form in a batchprocessor?

A batchprocessor is a full client, so you should have no problem whatsoever accessing the form…

pbakker:

But how do you access the form in a batchprocessor?

A batchprocessor is a full client, so you should have no problem whatsoever accessing the form…

Erm…it’s a headless client. How would you want to access the form as a human? :)

Ehum… You just use a solution as batchprocessor… you can also open the same solution as a client and alter the settings for the schedule by going to the form.

As I understand it, he wants to have scheduled processes and through a GUI he created be able to edit their schedule.

Paul

  • create a table with preferences
  • create a form for the user to access the table

That is how I created settings for a batch processor.

pbakker:
Ehum… You just use a solution as batchprocessor… you can also open the same solution as a client and alter the settings for the schedule by going to the form.

As I understand it, he wants to have scheduled processes and through a GUI he created be able to edit their schedule.

Paul

I stand corrected.

Make sure to have your cron-entry in a global startup method and you’re all set. Something like this:
http://www.servoymagazine.com/home/2007 … tho_1.html

Looks like Robert will be attending the ServoyWorld Batchprocessors session :wink:

Looks like Robert will be attending the ServoyWorld Batchprocessors session ;-)

Isn’t that that single, very intense, 1:1 session against that ridicule rate :lol:

jaleman:
Looks like Robert will be attending the ServoyWorld Batchprocessors session ;-)

Maybe I should. :oops:
I’ve been only using them since they were implemented (what was it? 2.1.x or so?)…or maybe it’s the 3 hour drive I just had…

Maybe I could join Robert in this ‘intensive’ session.

Have a WebClient solution for an Art Exhibition company that display 3 x GIFs of artists pictures on all the web pages and changes them every 10 seconds. Set the GIF rotation up as batch Processor on server and hums along beautifully.

However, we also have WebClient forms for potential exhibitors/visitors to apply for tickets etc and discovered that if they typing into a field when the GIFs are changed the field focus is lost - can get quite frustrating.

Doing an applicationSavedata() immediately before the rotation saves the field contents but would welcome ideas to avoid the Batch Processor inteferring with form filling.

Regards

Graham Greensall
Worxinfo Ltd

Maybe a stupid suggestion but why don’t you make the gif an animated gif?