Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Minor corrections to text

...

  • This feature has been fully implemented on the Universal Agent and It has been implemented for classic JobScheduler Agents (JS-1420).

Workarounds

Workaround Title
Status
colourYellow
title???

  • Should job scripts not be able to catch signals by traps then you can use a monitor script, i.e. a post-processing script, that would be called by JobScheduler on receipt of a SIGTERM signal (JS-1463). For example:

    Code Block
    languagexml
    titleWorkaround for shell jobs with a timeout
    <job name="shell_with_javascript_monitor">
        <script  language="shell">
            <![CDATA[
    echo hello world!
    sleep 45
            ]]>
        </script>
    
        <monitor  name="process0" ordering="0">
            <script  language="java:javascript">
                <![CDATA[
    function spooler_process_before(){
    	return true;
    }
                ]]>
            </script>
        </monitor>
    
        <run_time />
    </job>

Examples

Example Title .....
Status
colourYellow
title???

Download the Example

job_trap_sigterm.job.xml.zip

Description

This example contains a job that uses a SIGTERM trap to show the difference between the <kill_task> and <terminate_task> commands provided by JOC.

...