Scheduler table definition

Each scheduler requires several database tables and indices to operate. Each table name and index described in this topic requires a table prefix. For example, if the scheduler is configured with a table prefix value, SCHED_, the table with the name, TASK, would be named SCHED_TASK. See Scheduler settings for details on the table prefix.

To create the tables, see Creating the database for schedulers. To see the exact schema definition such as field sizes and types, see Creating scheduler tables using DDL files. This section references the location where the DDL or SQL statements are stored. These statements create the table schema.

Note: The information in this topic is provided for problem determination. Do not alter the scheduler table names, field names or index names. The data content format might change without notice. Be aware of this factor when accessing the tables directly. Modifying data in the tables without using the Scheduler API might cause failures.

 

TASK

The TASK table contains the tasks that have been scheduled, but not yet purged. The primary key for this table is the TASKID which equates to the getTaskID() method on the com.ibm.websphere.scheduler.TaskStatus interface.

Since there is one row in this table for each task, it is important that the database and table support row-locking. Using page, or table locks, inhibits the scheduler from running tasks concurrently.

Field name Purpose and notes
TASKID

Contains all of the tasks that have been scheduled, but not yet purged. The primary key for this table is TASKID which equates to the getTaskID() method on the com.ibm.websphere.scheduler.TaskStatus interface.

Since there is one row in this table for each task, it is important that the database and table support row-locking. Using page, or table locks, will inhibit the scheduler from running tasks concurrently.

VERSION Internal version ID of this row format.
ROW_VERSION The version of this row. Used for optimistic locking.
TASKTYPE The type of task: 1=BeanTaskInfo, 2=MessageTaskInfo
TASKSUSPENDED The value, 1, if the task is suspended.
CANCELLED The value, 1, if the task is cancelled.
NEXTFIRETIME The date in milliseconds using java.util.Date.getTime() when the task is scheduled to run next.
STARTBYINTERVAL The start-by-interval of the task.
STARTBYTIME Reserved.
VALIDFROMTIME The task start time.
VALIDTOTIME Reserved.
REPEATINTERVAL The task repeat interval.
MAXREPEATS The number of times to run the task.
REPEATSLEFT The number of times the task has yet to run.
TASKINFO Internal binary data.
NAME The task name.
AUTOPURGE The value, 1, if the task is to automatically purge upon completion.
FAILUREACTION Reserved.
MAXATTEMPTS Reserved.
QOS Reserved.
PARTITIONID Reserved.
OWNERTOKEN The task owner.
CREATETIME The time in milliseconds using java.util.Date.getTime() when the task was created.

The TASK table also has the following indices that are required to allow the scheduler to run and access tasks concurrently:

  • TASK_IDX1 – Used to access individual tasks using the Scheduler API.

  • TASK_IDX2 – Used by the poll daemon to load expiring tasks.

 

TREG

The TREG table is used to store scheduler information

that is shared between redundant schedulers. This table is not highly used.

Field name Purpose and notes
REGKEY The registry key. This is the primary key of the table.
REGVALUE The registry value.

 

LMGR

The LMGR table is used to track the leases

that redundant schedulers use. This table is not highly used.

Field name Purpose and notes
LEASENAME The name of the lease. This is the scheduler JNDI name and is the primary key.
LEASEOWNER The owner of the lease. The format is Cell/Node/Server.
LEASE_EXPIRE_TIME The time in milliseconds using java.util.Date.getTime() when the lease for the scheduler expires.
DISABLED Reserved.

 

LMPR

The LMPR table is used to store arbitrary properties

for the lease. This table is not highly utilized.

Field name Purpose and notes
LEASENAME The name of the lease. See the LMGR table.
NAME The name of the property.
VALUE The value of the property.

The LMPR table also has the following index:

  • LMPR_IDX1 – Used to retrieve properties for a given lease.


 

Related Tasks


Creating scheduler databases