Pages

Friday, December 31, 2010

Getting to know Schedulers and Jobs in Websphere Commerce


The scheduler is a background server (runs as a low priority thread) which schedules and runs jobs at the site and store levels.

Some of the key tables are

SCHACTIVE – This contains an active list of jobs that needs to be executed. The scheduler polls this table to find the jobs to run.

SCHCONFIG – This table contains the configuration information for a particular job. The configuration may be an INTERFACENAME of a command to be executed, STOREENT_ID if the job has to run for a specific store (0 for all stores) and you can also specify which node of your application server cluster will run this job by specifying the SCCHOST field in this table.

SCHSTATUS – For each job that is executed, this table contains the status of the job. This table might have huge number of records after a certain amount of time which might impact performance of WCS.

There are three kinds of jobs namely Regular, Store Level and Broadcast jobs. Regular jobs run at site level and are generally Commands that are automatically scheduled to execute at a particular interval. When a regular job is created (using websphere commerce administration console), an entry is made to the SCHACTIVE table with status as I (Has to run at preferred start time). Once the job runs and completes, an entry is made to the SCHSTATUS table.

Store Level Jobs contain a task command that check if the job needs to be run based on certain conditions. When created, an entry to SCHACTIVE table is made with status as W (Waiting for execution).

Broadcast jobs are run by all the websphere commerce servers / nodes connecting to the same database.

To remove job status records from SCHSTATUS table, either login to websphere commerce administration console and delete the status by selecting them or click “Remove All” to delete all records from the scheduler status table.

No comments:

Post a Comment