码迷,mamicode.com
首页 > 系统相关 > 详细

shell脚本执行kettle任务脚本

时间:2017-04-24 17:20:29      阅读:359      评论:0      收藏:0      [点我收藏+]

标签:pat   migration   shell脚本   logs   exit   lang   脚本   shel   ttl   

#!/bin/bash

export SHELL_HOME_PATH=/home/admin/test/data-integration/xlDataMigration
export LANG=zh_CN.UTF-8
export LOGS=/home/admin/test/data-integration/data/logs

DATE=`date +"%Y%m"`
DAY=`date +"%d"`
TIME=`date +"%H%M%S"`

if [ -d "$LOGS" ];then
echo "$LOGS is OK"
else
mkdir -p $LOGS
echo "$LOGS is created"
fi

if [ -d "$LOGS/$DATE" ];then
echo "$LOGS/$BUSINESS/$DATE is OK"
else
mkdir -p $LOGS/$DATE
echo "$LOGS/$BUSINESS/$DATE is created"
fi

TIME1=`date +"%H%M%S"`
if [[ $? -eq 0 ]];then
sh /home/admin/test/data-integration/kitchen.sh -file=/home/admin/test/data-integration/xlDataMigration/personAndVillageData.ktr.kjb >>$LOGS/$DATE/$DAY/deal_01_new_data_source_00_info_$TIME1.log
echo "excute deal_01_new_data_source_00_info.sh is successful"
else
echo "excute deal_01_new_data_source_00_info.sh is error";
exit 1;
fi

shell脚本执行kettle任务脚本

标签:pat   migration   shell脚本   logs   exit   lang   脚本   shel   ttl   

原文地址:http://www.cnblogs.com/hds-study-blogs/p/6757495.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!