Ebase Scheduler

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

azaleas
Ebase User
Posts: 81
Joined: Thu Jul 30, 2015 12:44 pm

Ebase Scheduler

#1

Postby azaleas » Thu Aug 20, 2015 11:22 am

Hi, is there any tutorials on Scheduler. On how to create custom schedules and etc?
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Thu Aug 20, 2015 3:37 pm

There isn't much information on the scheduler - just one page in the documentation http://dev-docs.verj.io/ufs/doc/scheduler.htm. Basically, the scheduler allows you to set up tasks to run at regular scheduled intervals e.g. daily, weekly etc. The scheduler can only execute Java classes that implement the ExcutableTask interface and a number of these are provided with the system. By far the most useful of these classes is Form Runner and this is available from the dropdown list. Basically you can use this Form Runner to execute any form - though it actually executes only the before form and after form events and ignores any pages. But this still provides quite a powerful means of scheduling a piece of code.
0 x

azaleas
Ebase User
Posts: 81
Joined: Thu Jul 30, 2015 12:44 pm

#3

Postby azaleas » Tue Aug 25, 2015 12:34 pm

Hi Jon,

I have a page with Booking Request Tickets. I need to create a daily reminder, which will show "Still Open/Not Completed" Booking Tickets on the page. How can I do this? I now I have to use a Scheduler, but I'm not sure how to do it.

And also, I couldn't find Ufs.schedulerWakeupInterval parameter in UFSSetup.properties file.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#4

Postby Jon » Tue Aug 25, 2015 1:15 pm

A scheduled task runs in background so it can do things like check a database and send emails but it can't display a page to a user - because there is no user. Steps to achieve this are:
  • 1. Create a form and add a script to the before form event (configured in form properties). This script should contain whatever logic you need e.g. check database tables, issue emails etc. If you want, you can add a page to the form so you can test it, but this will not be used when the form is run by the scheduler.
    2. Schedule this form to run using the Form Runner scheduled task (Tools > Scheduler). Set the interval under Scheduler Information and set the next execution date and time to a date/time in the past - this ensures it will run the next time the scheduler wakes up.
You can just add Ufs.schedulerWakeupInterval to UFSSetup.properties if it's missing.

There is another approach to this problem which is to use the Ebase Workflow system and add a new workflow job each time you receive a new booking ticket. If you just want to do something simple like send a reminder email, then using workflow is probably an overcomplicated solution. But if you want to pass each booking ticket through a business process e.g. authorization, checking etc which involves different people, then using workflow would be an appropriate solution. The workflow system supports escalators which enables you to set deadlines for when tasks should be completed and what happens when these deadlines are not met.
0 x


Who is online

Users browsing this forum: No registered users and 17 guests