IBM Support

Cancel a TWS job and the job continues to run

Question & Answer


Question

Why does a started Tivoli Workload Scheduler (TWS) job continue to run after it has been canceled?

Cause

Working as designed.

Answer

From the documentation placed in ' conman help ' you can see that cancel only affects the job at the TWS level:

conman help cancel

"...If you cancel a job before it is launched, it does not launch. If


you cancel a job after it is launched, it continues to run. If you
cancel a job that is running and it completes in the ABEND state,
no automatic job recovery steps are attempted.

If you do not use the ;pend option, jobs and job streams that are
dependent on the cancelled job are released immediately from the
dependency.

If you include the ;pend option, and the job has not been
launched, cancellation is deferred until all of the dependencies,
including an at time, are resolved. Once all the dependencies are
resolved, the job is cancelled and any jobs or job streams that
are dependent on the cancelled job are released from the
dependency. During the period the cancel is deferred, the notation
[Cancel Pend] is listed in the Dependencies column of the job in a
showjobs display.

If you include the ;pend option and the job has already been
launched, the option is ignored, and any jobs or job streams that
are dependent on the cancelled job are immediately released from
the dependency.
You can use the rerun command to rerun jobs that have been
cancelled, or that are marked [Cancel Pend]. You can also add and
delete dependencies on jobs that are marked [Cancel Pend].

To immediately cancel a job that is marked [Cancel Pend], you can
either enter a release command for the job or enter another cancel
command without the ;pend option.

For jobs with expired until times, the notation [Until] is listed
in the Dependencies column in a showjobs display, and their
dependencies are no longer evaluated. If such a job is also marked
[Cancel Pend], it is not cancelled until you release or delete the
until time, or enter another cancel command without the ;pend
option.

To stop evaluating dependencies, set the priority of a job to zero
with the altpri command. To resume dependency evaluation, set the
priority to a value greater than zero.

Note: In the case of internetwork dependencies, cancelling a job
in the external job stream releases all local jobs and job
streams from the dependency. Jobs in the external job stream
represent jobs and job streams that have been specified as
internetwork dependencies. The status of an internetwork
dependency is not checked after a cancel is performed. For
more information see the Reference Manual."

To accomplish the goal of stopping the process that is the result of a TWS job launch, the conman feature 'kill' has been provided. From 'conman help kill':

"...The kill operation is not performed by conman; it is run by a
scheduler production process, so there might be a short delay.

Killed jobs end in the ABEND state. Any jobs or job streams that
are dependent on a killed job are not released. Killed jobs can be
rerun.

In UNIX, this is accomplished with a UNIX kill command...."

[{"Product":{"code":"SSGSPN","label":"IBM Workload Scheduler"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"8.5;8.5.1;8.6;9.1;9.2;9.3","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Product Synonym

Maestro;TWS;IWS;TWA

Document Information

Modified date:
17 June 2018

UID

swg21299670