WebSphere Commerce EnterpriseWebSphere Commerce Professional

Configuring the scheduler to run a job on an instance or cluster member

You can configure the WebSphere Commerce scheduler to run a job on a particular WebSphere Commerce instance or cluster member. This can be useful if you want to devote one server for scheduled jobs.

About this task

To isolate a scheduled job to a particular instance or cluster member:
  • Modify the Application Servers running the WebSphere Commerce instance to give the scheduler a unique identifier.
  • Create or update a scheduled job to run on a unique WebSphere Commerce instance.

To uniquely identify each server process running WebSphere Commerce, the following JVM parameter is required: com.ibm.commerce.scheduler.SchedulerHostName

The value should be unique across all servers running your WebSphere Commerce instance. This will allow you to created a scheduled job that runs on a particular server in your cluster. A recommended value would be: node name. server name. This will be unique across your WebSphere Cell.

This value can be specified using the WebSphere administration console and specifying this system property in the JVM settings of the WebSphere Commerce application:

To create a job to run on a particular host, when calling the AddJob command to create the new schedule job, specify the host parameter and use the value that uniquely identifies the scheduler process that should execute the scheduled job.

If you want to manually change an existing job, update the SCCHOST column in the SCHCONFIG table for the job you want to run on a particular instance. When changing the SCCHOST column, ensure that the value is specified in lowercase characters. Because of performance reasons, the scheduler assumes that the host parameter will be specified in lowercase. The AddJob command makes the host value lowercase automatically but there is nothing in place at the database to maintain this restriction.

To configure the scheduler to run a job on one host, perform the following steps for each node in the cluster:

Procedure

  1. Log onto the WebSphere Administrative Console.
  2. Select Servers > Application Servers.
  3. Select your WebSphere Commerce Server name. For example, server1.
  4. On the Application Servers panel, under the Server Infrastructure heading, select Java and Process Management > Process Definition.
  5. On the Process Definition panel, under the Additional Properties heading, select Java Virtual Machine.
  6. In the middle window, on the right hand side under the Additional Properties heading, select Custom Properties.
  7. Click New. A new page opens for you to add additional JVM properties.
  8. In the Name field, enter com.ibm.commerce.scheduler.SchedulerHostName.
  9. In the Value field, enter the unique identifier of the scheduler instance on this Java process.
  10. In the Description field, enter the host name parameter for this scheduler instance to use.