The scheduler runs tasks in a global transactional context, by
default. If a task is failing due to a configuration problem or application
error, the scheduler attempts to retry the task until the scheduler failure
threshold is reached. This topic describes how to stop the tasks that are
failing.
About this task
When the task reaches the failure threshold, the scheduler stops
running the task until the scheduler daemon is restarted using the WASScheduler
MBean, the scheduler fails over to another server, or until the scheduler
is resumed using the resume method on the Scheduler API or WASScheduler MBean.
Procedure
- Cancel or suspend a transactional (QOS_ONLYONCE) task that is continually
failing. This action can be difficult if the scheduler has not
yet reached the failure threshold. The cancel and suspend Scheduler API methods
or WASScheduler MBean operations block until the task fails or the method
times out, while waiting for a database lock and throws a TaskPending exception.
If this is occurs, then the application can retry the cancel or suspend operation
until it completes.
- Alternatively, stop the scheduler daemon using the stopDaemon operation
on the WASScheduler MBean to avoid running the task multiple times, and run
the cancel or suspend operation while it is stopped. While the daemon is stopped,
the scheduler does not run tasks. However, all MBean operations and API methods
are still available.