...
They are to be found the ./bin folder of the JUA installation.
The JUA start script starts the Agent with the new -kill-script parameter as follows:
- by default the -kill-script is parameterized with the path to the kill script for Windows/Unix as appropriate,
- the SCHEDULER_KILL_SCRIPT environment variable can be used to set a different kill script.
option can be used to specify a different kill script if necessary. See the Command Line Options section in JobScheduler Universal Agent - Installation & Operation for more information.
See also See JS-1468 & JS-1495 for more detailed information about the implementation.
Delimitation
- This feature is intended for Unix platforms that implement the SIGTERM and SIGKILL signals. It is not intended for Windows platforms for which exclusively the Kill kill Immediately command applies.
- When using traps then please consider that the process created by the
<shell>
the<script ... language="shell"/>
element receives the signal. Subsequent scripts that are called within the<shell>
<script ... language="shell"/>
element will not receive the signal. You could therefore:- configure traps directly within the
<shell>
<script ... language="shell"/>
element. The shell process will then receive and handle the signal. - configure traps in a shell script that is added by an
<include>
element instead of being stated within the<shell>
the<script ... language="shell"/>
element. The included shell script will receive and handle the signal. - forward signals to subsequent shell scripts that are called within a
<shell>
<script ... language="shell"/>
element.
- configure traps directly within the
- This feature has been fully implemented on for the Universal Agent and It has been implemented for classic for the Classic JobScheduler Agents (JS-1420).
...
- Terminate:
<kill_task immediately="true" timeout="...">
- Kill:
<kill_task immediately="true">
- Timeout: a job with the timeout attribute.
Status colour Yellow title Verify
Windows Standalone | Linux Standalone | Windows Classic Agent | Linux Classic Agent | Windows Universal Agent | Linux Universal Agent | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Shell job | ||||||||||||||||||||||||||||||
Terminate | not supported | not supported | 2)
| not supported | ||||||||||||||||||||||||||
Kill |
|
|
| |||||||||||||||||||||||||||
Timeout |
|
|
| |||||||||||||||||||||||||||
Shell job with monitor | ||||||||||||||||||||||||||||||
Terminate | not supported | not supported | not supported | 3)
| ||||||||||||||||||||||||||
Kill |
| 1)
| ||||||||||||||||||||||||||||
Timeout | 1)
| |||||||||||||||||||||||||||||
API job | ||||||||||||||||||||||||||||||
Terminate | not supported | not supported | not supported | |||||||||||||||||||||||||||
Kill | ||||||||||||||||||||||||||||||
Timeout |
...
Examples
...
Using a SIGTERM trap to show the difference between the
...
kill
and terminate
commands
Download the Example
...