JOB链:JOB之间的相互触发操作。

实验意图:有些JOB具有先后调用次序,比如先做一件事情,这件事情做完才能继续下一件事情,而第一个JOB如果自己挂掉的话,第二个JOB需要正常运行(默认是终止),这时就需要配置JOB链,在错误的情况下不终止。

实验步骤:创建2个JOB,test1和test2,第一个需要出异常,第二个正常。

第一个JOB(test1.job.xml)配置如下:

<?xml version="1.0" encoding="ISO-8859-1"?>
<job stop_on_error="no" title="Test1." order="yes">
<script language="shell"><![CDATA[
Call D:\Application\EnterpriseShare.Core\ETL\Runtime\bin\Test1_run.bat
]]></script>
</job>

第一个JOB(test2.job.xml)配置如下:

<?xml version="1.0" encoding="ISO-8859-1"?>
<job stop_on_error="no" title="Test2" order="yes">
<script language="shell"><![CDATA[
Call D:\Application\EnterpriseShare.Core\ETL\Runtime\bin\Test2_run.bat
]]></script>
</job>

JOB链配置(Test.job_chain.xml)如下:

<?xml version="1.0" encoding="ISO-8859-1"?>

<job_chain  orders_recoverable="yes" visible="yes" title="ESD_Cost_Schedule">
<job_chain_node state="1" job="/test/test1" next_state="2" error_state="2"/> <job_chain_node state="2" job="/test/test2" next_state="end"/> <job_chain_node state="end"/>
</job_chain>

JOB Order配置(Test,Test.order.xml)如下:

<?xml version="1.0" encoding="ISO-8859-1"?>

<order >
<params /> <run_time let_run="yes" once="yes">
<period let_run="yes" repeat="00:03" begin="00:00" end="24:00" when_holiday="ignore_holiday"/> <holidays />
</run_time>
</order>

三分钟跑一次。

结果:

当第一个job出现异常时,第二个还能继续运行。

job_chain的更多相关文章

随机推荐

  1. SignalR —— Asp.net RealTime的春天

    一般的例子:http://www.asp.net/signalr/overview/signalr-20/getting-started-with-signalr-20/tutorial-gettin ...

  2. html基本标签练习

    Alt  显示工具栏 f2修改文件名称 内联元素:<div>只占一行</div> 块级元素:<span></span> 以utf8无bom格式编码 安装 ...

  3. python 代码片段13

    #coding=utf-8 # 条件转化 data=raw_input("enter 'y' or 'n'") if data[0]=='y': print "you t ...

  4. jQuery Event.delegateTarget 属性详解

    // 为id为element的元素中的所有span元素绑定click事件 $("#element").on( "click", "span" ...

  5. 【POJ】3255 Roadblocks(次短路+spfa)

    http://poj.org/problem?id=3255 同匈牙利游戏. 但是我发现了一个致命bug. 就是在匈牙利那篇,应该dis2单独if,而不是else if,因为dis2和dis1相对独立 ...

  6. Ajax注册验证用户名是否存在 ——引自百度经验

    Ajax注册验证用户名是否存在 http://jingyan.baidu.com/article/a948d6515fdf870a2dcd2e85.html

  7. 带你学C,带你飞——入门

  8. Reprojection Matrix Q

    Given the disparity d and 2D point (x, y) , we can derive the 3D depth using the 4-by-4 reprojection ...

  9. react-amazeui-touch 妹子Ui移动端学习

    必须先配置并且学习react环境: http://www.cnblogs.com/CyLee/p/5668373.html 官方地址 http://t.amazeui.org/#/docs/form? ...

  10. Office and Windows KMS使用帮助

    Office KMS Key: http://technet.microsoft.com/zh-cn/library/dn385360.aspx                         htt ...