2.7.2 Stopping JP1/Script
Stop the JP1/Script component programs as described below.
- Organization of this subsection
(5) Terminating the script file forcibly
You can use Process Viewer, the TerminateProcess command, the WaitForExec command (with Abort specified), or the Exit command (with Abort specified) to forcibly terminate a script file. If the script file that is to be terminated forcibly has called another script file, the called script file will also be terminated forcibly. If an executable file other than a script file is called, only that executable file is terminated forcibly.
(6) Forcibly terminating JP1/Script from JP1/AJS
JP1/Script script files registered in a JP1/AJS jobnet or job can be forcibly terminated from JP1/AJS. At this time, executable files that were called from the JP1/Script script files are also terminated.
The range of executable files that are terminated depends on whether they were called from a JP1/Script script file or from a non-JP1/Script script file. The following table illustrates three specific patterns:
Pattern |
Calling procedure |
Range of executable files terminated when JP1/Script script file is forcibly terminated from JP1/AJS |
---|---|---|
Pattern 1 |
1: JP1/AJS process 2: JP1/Script script file 3: Non-JP1/Script script file |
Up to executable file 3. |
Pattern 2 |
1: JP1/AJS process 2: JP1/Script script file 3: JP1/Script script file 4: Non-JP1/Script script file |
Up to executable file 4. |
Pattern 3 |
1: JP1/AJS process 2: JP1/Script script file 3: Non-JP1/Script script file 4: Non-JP1/Script script file |
Up to executable file 3. (Executable file 4 is not terminated.) |
However, if the JP1/Script script file does not terminate within 30 seconds after forced termination is requested from JP1/AJS, use the TerminateProcess function of the Win32 API to forcibly terminate it. Because the TerminateProcess function does not terminate the executable file called from a JP1/Script script file, only the JP1/Script script file of 2 in each pattern shown in the table above is terminated.
- Important note
-
Forced termination should be used only when developing a script. Forced termination is not recommended for job execution.