Administer > Overview of administering a WebSphere Commerce site > Administration Console > Scheduler
Jobs
A job is a WebSphere Commerce command that is scheduled to run on behalf of a site or store at a specified time or interval. There are three types of jobs.
- Regular jobs
- Commands designed to run automatically at a specified start time. They do not check a business logic task command before running. Only Site Administrators can schedule this type of job. When a regular job is scheduled, a new entry in the SCHACTIVE table is created with a state of I. When the job is executed, a new entry in the SCHSTATUS table is created. The new entry contains the state and status information about the execution of the scheduled job.
- Store level jobs
- Similar to regular jobs, but they contain a task command that checks the business logic to determine if the job needs to be run. This filtering process allows the scheduler to run only necessary jobs, minimizing its workload. When a store level job is scheduled, a new entry in the SCHACTIVE table is created with a state of W. Store level jobs are designed to be associated with a particular store and can be scheduled by Site Administrators. When the job is executed, a new entry in the SCHSTATUS table is created. The new entry contains the state and status information about the execution of the scheduled job.
- Broadcast jobs
- Apply all clones to run them immediately, or as soon as the scheduler can arrange. They run once on all clones or WebSphere Commerce Servers that are connected to the same database. A broadcast job start time is always the current time and they expire after a time period specified in the configuration file; the default expiry time period is thirty minutes. Broadcast job status is logged in the SCHBRDCST database table and displayed in the Scheduler Status Display page.
Each job runs as a separate thread, and multiple jobs can be scheduled to run simultaneously. A fixed number of threads are assigned to each application group.
To avoid overloading the default application pool, the Schedule Job window allows for application partitioning. The application type is entered into the SCHCONFIG table with the number of threads assigned to execute the job.
The Schedule Job window can also be used to specify the start time for a job. Job tracking information, including start time, end time, and status is maintained in the SCHSTATUS table and displayed on the Scheduler Status Display page.
A warning is printed to the SystemOut.log if a thread runs long. For example:
ThreadMonitor W WSVR0605W: Thread "WorkManager.default : 12" (00000029) has been active for 764118 milliseconds and may be hung. There is/are 1 thread(s) in total in the server that may be hung.If a thread is active for more than 30 minutes, WebSphere Commerce considers it hung. You can ignore these warnings if some scheduler jobs running on these threads are expected to execute for more than 30 minutes. If necessary, configure WebSphere Application Server's hang detection policy to more appropriate values.
When there are jobs not expected to run for more than 30 minutes, but the warning statement still appears in the SystemOut.log file, further investigation might be required. Typically, the trace specification, com.ibm.websphere.commerce.WC_SERVER=all, can be used to determine what job was executed on this thread ID, for example, 00000029.
- Schedule a site-level job
Use the Administration Console to schedule a job to run for the site.
- Schedule a store-level job
Use the Administration Console to schedule a job to run on the store.
- Maintain the scheduler
The SCHSTATUS table contains one entry for every execution of a job in the SCHCONFIG table. Because of the large volume of jobs run by the scheduler, job status records kept in the SCHSTATUS table become quite numerous. This can have an adverse affect on the performance of the WebSphere Commerce Server. It is therefore recommended that you periodically clean up the SCHSTATUS table.
- Scheduler configuration parameters
You can change scheduler parameters to control behavior such as expiry time, waiting time between checks for jobs, and the number of threads to allocate to an application type.
- Scheduled job states
The SCHACTIVE table contains the list of jobs that are scheduled to run, and the execution time for each scheduled job. The execution history for each scheduled job is kept in the SCHSTATUS table.
- Schedule marketing jobs
If the store uses the new Web services-based marketing system, the following scheduled jobs are added. You can adjust the schedule on which these jobs run if necessary.