Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Overview


4.5.10 Killing a job or jobnet

You can kill a running job or jobnet. When you kill a running job, the processes in the running job are forcibly terminated. When you kill a jobnet, no new jobs are allowed to start in the jobnet, and all running jobs are forcibly terminated.

To this operation, you can use JP1/AJS3 - View, the Web GUI, the API function to kill, or the ajskill command. For details on using JP1/AJS3 - View, see 9.10 Killing the jobnets and the jobs being executed in the JP1/Automatic Job Management System 3 Operator's Guide. For details on using Web GUI, see 16.6 Monitor dialog box in the JP1/Automatic Job Management System 3 Operator's Guide. For details on using the kill API, see 7.1.17 Kill API in the manual JP1/Automatic Job Management System 3 Command Reference. Alternatively, for details on the ajskill command, see the description of ajskill in 3. Commands Used for Normal Operations in the manual JP1/Automatic Job Management System 3 Command Reference.

Organization of this subsection

(1) Killing a job

You can kill a job that is currently running. When you kill a job, execution is terminated for the job you specified. The killed job is then treated as having ended abnormally. You cannot kill a job that is not currently running.

Note that when you kill a job, other jobs in the same jobnet keep running. To prevent new jobs in the jobnet from executing, you must first interrupt the jobnet before killing the jobs.

If the jobs that are running on Windows are forcibly terminated, only the processes started by JP1/AJS3 will be forcibly terminated. The processes under each of these processes will not be forcibly terminated. In addition, even if the running jobs are forcibly terminated, the resources that were being used by the processes under each of these processes will not always be made free.

However, if the processes started by JP1/AJS3 are the processes specified in the script file (.spt) created by JP1/Script, the range of the processes to be forcibly terminated depends on the processes under these started processes.

For details, see 5.4.10(3) Killing a job created by JP1/Script.

Killing a Unix job sends a SIGKILL signal that kills the process group for the job. If a process within the job has successfully executed a setgrp (set process group) system call, the processes in that process group are not killed. You will therefore need to terminate the processes in such a process group using other means, such as the kill command.

(2) Killing a jobnet

When you kill a jobnet, all running jobs including any nested jobnets are killed, and no new jobs can start. The killed jobnet is treated as having ended abnormally. You cannot kill a specific nested jobnet by itself.

The difference between killing and interrupting a jobnet is that all running jobs are forcibly terminated in the former case, but not the latter.

(3) Canceling monitoring of a jobnet with a start condition

To stop a jobnet from monitoring for a start condition, kill the root jobnet whose status is Now monitoring.

When a start condition is specified for a jobnet, there is typically one jobnet with the status Now monitoring. When the start condition is satisfied, a new generation of the jobnet is created and executed. Accordingly, if you want to stop monitoring altogether, select the original jobnet with the Now monitoring status and kill it.

(4) Unit statuses that can be killed

You can only kill a job or root jobnet in one of the following statuses:

Job statuses
  • Now queuing

  • Now running

A queueless job in Waiting to execute status can also be killed.

Root jobnet statuses
  • Now running

  • Running + Warning

  • Running + Abend

  • Now monitoring