Wiki

Case Status
Log In

Wiki

 
OASIS Batch Job Monitor
  • RSS Feed

Last modified on 7/16/2014 9:05 AM by User.

Tags:

OASIS Batch Job Monitor

 

Overview

This document is intended for internal Ingen Software staff and advance users.

Several OASIS tasks are periodic background tasks providing connectivity to FAX solutions, sharing information with other companies or simply backing up the OASIS database. This document describes the batch service and how to configure the service.

System Architecture

The system consist of the database where content is stored, the job initiator, a job monitor and the job code (instructions). The OASIS GUI is primarily used to configure the batch jobs.


 

(Each block represents one process running.)

OASIS GUI – The OASIS user interface is used to configure and monitor the jobs.

OASIS Database- All configuration information an job output is stored in the database.

Windows Service – Typically, the windows service manager is used to start the OASIS Batch Initiator Service. However, the OASIS GUI may be used to start the JOB Initiator. The difference: a service starts and stops with the PC; however, starting the Job initiator with the OASIS GUI will terminate the initiator if the GUI is closed.

JOB Initiator – The initiator reviews a job defined in the OASIS database and launches a job monitor for each job when the time parameters match the current time. If the monitor does not update the state in the database within 5 minutes (approximately) then the status of the job will be set to “Unknown”. 5 minutes later, the job will be marked as terminated. A manual review of logs may be required to diagnose the issue.

Job Monitor – the monitor runs in the same process as the program code – but only for Java programs. In all other cases, a process is created and the monitor “blocks” until the job is complete. Every minute, the monitor updates the state of the job in the database. The monitor may also terminate the job if the job runs longer than the expected time configured in the database.

JOB – Typically Java code accessing the OASIS database. However, the job may also be a non-Java process.

Configuring Jobs

Several pre-defined OASIS jobs are delivered in OASIS V2.7. These jobs may be enabled, reconfigured or disabled as described below.

Job configuration is located in the software application under the tools menu:


 

The batch job listing shows all defined jobs, their name, time pattern and current state:


 

Double clicking on one of the jobs will show the batch job editor, allowing the user to change the job configuration:


 

Job Name – name of the job
Affinity Host – the PC where this job run (use hostname on the PC to find the name)
Time Pattern – when to run the job (see below)
Run As – OASIS user the job should run as (their user ID will show in “updated by” fields).
Expected Runtime – how long (max) to expect the job to run (in minutes)
No Overtime – when set and a non-zero value is set for Expected Runtime, the monitor will terminate the job if the job runs over time (clock not CPU time).
Current State – state of the job (see below)
JVM – JVM to start the monitor with. Leave blank to use the JVM installed with OASIS.
CWD – working directory to change to (LEAVE BLANK IN MOST APPLICATIONS!)
JVM Params – optional JVM startup parameters (e.g. memory size).
Class Name – class with a standard “main” function to be called by the monitor
Application Params – information passed directly to the class main method as ARGS.

Clicking on the history tab shows each run cycle of the job:


 

The following fields are shown:

Cycle – the Nth run of the job
Host – where the job ran
State – the current state of the job (see below)
User – user that the job ran “as”.
Summary – short summary of the job (e.g. 55 records processed)
Updated – last updated date/time
Init – date/time when the initiator started the monitor process
Start – date/time when the user code was started by the monitor
End – date/time when the user code ended
Term – date/time when the monitor process ended
Total – amount of memory used by the monitor process
Max Total – max amount of memory used by the monitor process
Free – amount of free memory available to the monitor process
Max Free – max fee memory available to the monitor process
Max – max memory available to the monitor process
Max Max– peak memory use

Double clicking on a cycle will show the output and error messages from the job:


 

Typically fatal java stack traces will show in the error tab.

Performing a Test Run

It is possible to validate the installation by starting the batch service running on the local machine. Begin by opening the "OASIS Batch Jobs" window:


A popup will show indicating the bach service is now running:


The batch service will continue to run as the user that has logged into OASIS until the main OASIS window is closed. At that time the batch service will terminate. An attempt will be made to terminate the background jobs.

Using the Windows Service

The OASIS Batch Jobs uses a Windows service to run - even when a user is not logged into the computer. The service starts when the computer "boots".

Configuring

Begin by opening the "OASIS Batch Jobs" window:


The following configuration screen will show:


If the service is to run on the same computer the OASIS database is installed on, just press "Update" - this installs the service. If the service is to run on another computer, change the "Server" field to the name of the server running OASIS.

Contact Ingen Software for more information on changing other fields on this screen.

Starting and Stopping

To start or stop the service, open the Windows "Services" control panel. For most versions of Windows, the services control panel is found by opening the "Control Panels" from the Start Menu. Make sure to select "Classic View". Then select "Admin Tools" and finally double click on "Services". Scroll down to "OASIS-BATCH":

Simply press the "Play" button at the top of the screen:


The other buttons may be used to stop or restart the service.

OASIS Updates!

When an OASIS update is downloaded, the service will not immediately update itself. To have the batch service update to the latest OASIS release, restart the service 2 times. (The first time pulls down the update, the second time deploys the update - much like the workstations.)

 

Job States

Never Run – The job has never run
Setup – The initiator has setup the job
Spawned – The initiator has attempted to start the monitor for the job
Running – The monitor has started the job code
Stopped – The job code has stopped and the monitor is cleaning up the job process
Unknown – The monitor has not reported in over 5 minutes after the initiator started the job and the initiator has marked the job for termination (the process may never have even started or may have unexpectedly terminated).
Terminated – (final state) the job was terminated by the monitor for going over time or the initiator has waited 10 minutes w/o the monitor reporting.
Exception – (final state) an exception has occurred in the initiator, the monitor or in the job code. See the error tab of the job cycle for more information.
End – (final state) the job ended normally (there may be more information in the job cycle output

Time Patterns

The following time Patterns are available. Multiple time patterns may be used (with restrictions) by separating the entries with a semi colon.

ALWAYS – The initiator will start the job every time the job stops (min delay is about 1 minute).
DELAY=# - Wait # minutes after the job stops before initiating a new job
YEAR=# - Year pattern
MONTH=# - month pattern
MDAY=# - day of month (1-31)
WDAY=# - day of week (1-7)
HOUR24=## - 24 hour time
HOUR12=## - 12 hour time
MINUTE=# - minute

To run the job every Friday at  8:30PM, use the following example

  WDAY=6 ; HOUR24=20 ; MINUTE=30

Standard Jobs

The following jobs will be provided in V2.7. Only the required entry values are shown.

FAX

Process each fax entry in the InBox Connection manager

                Time Pattern: DELAY=2
                Expected Runtime: 10
                No Overtime: checked
                JVM Params: -Xmx512M
                Class Name: ingen.oasis.batch.standard.FAX
                Application Params:
 

BackupOASIS

Backup the oasis database using DBBackup (useful for backups to another server)

Set the Application Params to be the path to the backup directory on the local server (where the initiator is running).

                Time Pattern: HOUR=22
                Expected Runtime: 240
                No Overtime: not checked
                JVM Params: -Xmx256M
                Class Name: ingen.oasis.batch.standard.BackupOASIS
                Application Params: c:\OASIS

SubmittalSubscription


                Time Pattern: HOUR=18
                Expected Runtime: 30
                No Overtime: checked
                JVM Params: -Xmx512M
                Class Name: ingen.oasis.batch.standard.Submittals
                Application Params: