cjkilljob (Stop batch application or forcefully terminate batch server)

Format

When not using the scheduling functionality

cjkilljob server-name

When using the scheduling functionality

cjkilljob {server-name|[schedule-group-name] -jobID job-ID}

Function

This command stops the batch applications running on the batch server with the specified name. If an attempt to stop a running batch application fails, the batch server is forcefully terminated.

If you specify the schedule group name when using the scheduling functionality, this command stops the running batch application with job IDs specified in -jobID. Also, if the batch application with the job ID specified in -jobID are waiting in the CTM schedule queue, you can reserve the deletion of the batch applications. The CTM deletes the batch applications reserved for deletion, when the batch applications leave the schedule queue.

You can specify the options for the cjkilljob command using usrconf.cfg (option definition files for batch applications). You search the directories storing usrconf.cfg (option definition file for batch applications), in the following order:

  1. Directory specified in the environment variable (CJBATCHUSRCONFDIR)#
  2. Directory in which the cjkilljob command is executed

# In the environment variable (CJBATCHUSRCONFDIR), you specify the directory as the absolute path.

Arguments

server-name
Specifies the name of the batch server on which the batch application that you want to stop is running.
schedule-group-name
Specifies the group name of the batch server to be assigned when the CTM schedules the execution of batch applications.
You can also specify the schedule group name using usrconf.cfg (option definition file for batch applications). The following is the priority order for specifying schedule group names:
  • Arguments of the cjexecjob command
  • usrconf.cfg (option definition file for batch applications)
Note that you can omit schedule group names. JOBGROUP is the default value when you omit the specification of schedule group names.
-jobID job-ID
Specifies the job ID of the batch application to be stopped.
In UNIX, when specifying a job ID including a #, enclose the job ID in double quotation marks ("") (if the job ID is omitted when executing cjexecjob, a job ID including a # is automatically generated).

Input examples

When the server name is specified

cjkilljob MyBatchServer

When the job ID is specified

cjkilljob JOBGROUP -jobID HOGE

Return values

0:
The batch application is stopped.
Alternatively, the deletion of the waiting job ID in the schedule queue is reserved.
1:
The batch server is terminated forcibly.
2:
The command terminated abnormally.

Notes