문제

I'm now migrating SOS scheduler from sun solaris to Oracle linux ,

SOS Berlin scheduler is latest version from 1.5.3253 - Linux X64 with Java JDK 1.7.0.45 - 64 bits

Last time was using JavaScript but cannot be supported with 64 bits so I changed to use javax.script:javascript

Glad that every job is able to run but now the problem is the job would not continue to the next job once the first job is triggered.

Here is the script that I changed :

<?xml version="1.0" encoding="UTF-8"?>
<job order="yes" title="F0001">
  <params>
    <param name="command" value="'/disk4/job/F0001 > /disk4/job/logs/F0001.log'"/>
    <param name="ignore_error" value="0"/>
    <param name="ignore_signal" value="0"/>
    <param name="ignore_stderr" value="1"/>
    <param name="log_file" value="/disk4/job/logs/F0001.log"/>
    <param name="timeout" value=""/>
    <param name="interpreter" value="/bin/ksh"/>
  </params>
  <script
    java_class="sos.scheduler.managed.JobSchedulerManagedExecutableJob" language="java"/>
  <monitor>
    <script language="javax.script:javascript">
        function spooler_task_after(){
                        var exitCode = spooler_task.exit_code();
                        if(exitCode != 0){
                                spooler_log.info("Program exit with exit code : " + exitCode);
                                return false;
                        }
                        return true;
        }
    </script>
  </monitor>
</job>

Here is my job chain :

<?xml version="1.0" encoding="UTF-8"?>
<job_chain title="001_DAILY">
  <job_chain_node error_state="error" job="F0001" next_state="1" state="0"/>
  <job_chain_node error_state="error" job="F0002" next_state="2" state="1"/>
  <job_chain_node error_state="error" job="F0003" next_state="success" state="2"/>
  <job_chain_node job="001_END" state="success"/>
  <job_chain_node.end state="error"/>
</job_chain>

Here is my end job :

<?xml version="1.0" encoding="utf-8"?>
<job order="yes" title="001_END">
  <params>
    <param name="command" value="'echo DONE > /disk4/job/logs/001_END.log'"/>
    <param name="ignore_error" value="0" />
    <param name="ignore_signal" value="0" />
    <param name="ignore_stderr" value="1" />
    <param name="interpreter" value="/bin/ksh" />
    <param name="log_file"
    value="/disk4/job/logs/tmp_job_stdout.log" />
    <param name="timeout" value="" />
  </params>
  <script java_class="sos.scheduler.managed.JobSchedulerManagedExecutableJob"
  language="java" />
  <monitor>
    <script language="javax.script:javascript">

        function spooler_task_after(){
            return true;
        }
        </script>
  </monitor>
  <commands on_exit_code="success">
    <add_order id="002_ROUTINE" job_chain="/002_ROUTINE_A" replace="yes"/>
  </commands>
</job>

But after the end job, it would be able to go to next chain to continue but only be able to run the first job of second job chain only.

Is the the configuration error on the job chain ?

Any idea ? Thanks !

도움이 되었습니까?

해결책

Problem is identified .

The error is on the as below :

<param name="ignore_stderr" value="1" />

Previously I was using the version 1.3.x .

Now upgrading to the latest version and the variable name is changed .

The solution as below :

<param name="scheduler_order_ignore_stderr" value="1"/>

Then job will continue to the next as normal.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top