Hitachi

Job Management Partner 1 Version 10 Job Management Partner 1/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.

You can perform this operation using either the GUI, or the ajskill command. For details on using the GUI, see 9.10 Killing the jobnets and the jobs being executed in the Job Management Partner 1/Automatic Job Management System 3 Operator's Guide. Alternatively, for details on the ajskill command, see the description of ajskill in 2. Commands in the manual Job Management Partner 1/Automatic Job Management System 3 Command Reference 1.

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.

When you kill a Windows job, you only terminate the processes started by JP1/AJS3. Hence, killing a PIF file (*.pif) or a batch file (*.bat) running as a Windows job does not result in any of the commands running in those files being killed. Killing the job may not free up the resources being used by the process.

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