Hi
I need write a batch script with servoy.
There is any example or guide for do this?
Thanks for help!
Hi
I need write a batch script with servoy.
There is any example or guide for do this?
Thanks for help!
What is it you want to do exactly ?
ROCLASI:
What is it you want to do exactly ?
I need to start this batch file every day at specific times, read informations on database and send emails.
And with batch file I guess you don’t really mean a windows .bat file but a Servoy batch process.
I see the Servoy wiki is pretty thin with info on this.
What you do is you (preferably) create a new solution that you give the solutiontype ‘module’. This way it won’t show up as a solution you can open with a regular client.
Now you create a method that is linked to the onOpen event (see properties view when you select the solution in the Solutions Explorer).
This event is triggered the moment you launch the solution so this is where you want it to setup a scheduler to trigger another method at a specific time or period.
This will be done with the scheduler plugin.
As the wiki already states you can find the cron timing options via this link
After you setup the scheduler call and your method that does the periodic tasks then export the module from Developer and import it in Servoy server via the servoy-admin pages.
Then you go to the ‘Batch Processors’ page and select your module from the combobox. When needed add username and password (if you use Servoy security) and hit the Add button.
As you will see the page will update and show you the batch process.
Now you have setup the batchprocess definition but it’s not running yet (see Status). For that you need to hit the start button.
And that’s it.
Hope this helps.
ROCLASI:
And with batch file I guess you don’t really mean a windows .bat file but a Servoy batch process.I see the Servoy wiki is pretty thin with info on this.
What you do is you (preferably) create a new solution that you give the solutiontype ‘module’. This way it won’t show up as a solution you can open with a regular client.
Now you create a method that is linked to the onOpen event (see properties view when you select the solution in the Solutions Explorer).
This event is triggered the moment you launch the solution so this is where you want it to setup a scheduler to trigger another method at a specific time or period.
This will be done with the scheduler plugin.
As the wiki already states you can find the cron timing options via this linkAfter you setup the scheduler call and your method that does the periodic tasks then export the module from Developer and import it in Servoy server via the servoy-admin pages.
Then you go to the ‘Batch Processors’ page and select your module from the combobox. When needed add username and password (if you use Servoy security) and hit the Add button.
As you will see the page will update and show you the batch process.
Now you have setup the batchprocess definition but it’s not running yet (see Status). For that you need to hit the start button.
And that’s it.Hope this helps.
Yes i want create a Servoy batch process.
I did not know where to start but now I know.
Thanks for help!
I’ve another question about the scheduler.
I’ve try to create a job, but when I close my application the job doesn’t start. Is correct?
I must open my application because the job start?
Use the scheduler plugin inside a batch processor.
Hi,
If you use the scheduler plugin then you do this in the scope of the running client (be it a headless/batchprocessor-, web- or smart client). So yes, when you close the client your scheduler will cease to exist and your job won’t be triggered any longer.
So like Juan said use the scheduler in a batch processor (which is a headless client).
Hope this helps.