test.py # coding:utf-8
import sys #print "脚本名:", sys.argv[0]
for i in range(1, len(sys.argv)):
print sys.argv[i]
t.sh
va=$(python test.py $1 2>&1)
echo $va
sh t.sh '参数'
create table yan_task_parent
(task_id int,
parent_task_id int )
insert into yan_task_parent
select 1 ,2
insert into yan_task
select 2 ,current_timestamp,current_timestamp,1
truncate table yan_task
select * from yan_task_parent
select * from yan_task
-- shell 判定 输入参数 任务ID为1 查看依赖表 yan_task_parent 依赖任务2 是否在
-- 任务表yan_task 记录执行成功
--参数is_success =
select is_success from yan_task
where task_id in (select parent_task_id from yan_task_parent where task_id=1)
if is_success =1
then
--调起执行任务 1