King

business intelligence ,is my love。

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

login as: hadoop
hadoop@192.168.0.2's password:
Last login: Sat Mar 2 17:48:03 2013 from 192.168.0.13
[hadoop@hadoop-etl-2-175 ~]$ crontab -l
31 19 * * * /bin/sh /pentaho/Plan/a.sh
15 23 * * * /bin/sh /pentaho/Plan/b.sh
10 7 * * * /bin/sh /pentaho/Plan/c.sh
30 16 * * * /bin/sh /pentaho/Plan/d.sh
0 13 * * * /bin/sh /pentaho/Plan/e.sh
0 13 * * 7 /bin/sh /pentaho/Plan/week1.sh
10 13 * * 1 /bin/sh /pentaho/Plan/week2.sh
0 12 1 * * /bin/sh /pentaho/Plan/month1.sh
[hadoop@hadoop-etl-2-175 ~]$

linux 下面的批处理文件格式为:

sh------------------------------------------------------------------------------------------------------------

#!/bin/sh

export JAVA_HOME=/usr/local/java
export HADOOP_HOME=/hadoop/hadoop

cd /pentaho/pentaho/data-integration

./kitchen.sh -rep 192.168.0.13.PDI_Repository -user username -pass password -dir /目录名称 -job job名称 -level=basic>>/pentaho/Plan/job_loaddw.log

解释:-level=basic>>/pentaho/Plan/job名称.log 设置日志级别 输入日志

sh------------------------------------------------------------------------------------------------------------

手工执行kettle job 的命令如下:

login as: hadoop
hadoop@192.168.0.2's password:
Last login: Thu Apr 5 11:09:24 2012 from 192.168.0.13
[hadoop@hadoop-etl-2-175 ~]$ cd ..
[hadoop@hadoop-etl-2-175 home]$ cd ..
[hadoop@hadoop-etl-2-175 /]$ ls
: esvn lib mnt pentaho srv
bin etc lib64 mysql proc sys
boot etl lost+found net root tmp
dev hadoop media netxtreme2-6.2.23-1.src.rpm sbin usr
eclipse home misc opt selinux var
[hadoop@hadoop-etl-2-175 /]$ cd pentaho
[hadoop@hadoop-etl-2-175 pentaho]$ cd pentaho
[hadoop@hadoop-etl-2-175 pentaho]$ cd data*
[hadoop@hadoop-etl-2-175 data-integration]$
./kitchen.sh -rep IP地址.PDI_Repository -user username -pass password -dir /job路径 -job job名称

 

 

posted on 2013-03-04 12:53  kingstudy  阅读(5643)  评论(0编辑  收藏  举报