datax 定时执行多个job_windows定时任务执行kettle资源库中的job

通常情况下,在工作中在数据抽取过程中,会使用到job进行定时抽取。本文主要介绍kettle在windows下定时执行job。
备注:我用的kettle版本是5.1.0
1、准备编写kettle.bat脚本
脚本内容如下:
D:
cd D:kettledata-integration
kitchen.bat -rep JS_JOB -user admin -pass qdhuang -dir /FTP抽取入库 -job jobname -level=basic>D:JOB_LOGJOB.log
2、针对以上我来介绍下
首先cd 是进入到kettle安装执行文件目录下
-rep 表示的是你的仓库名,也就是你的资源库的名称,这里我的资源库名称就是 JS_JOB
-user 资源库用户名 这里就是admin
-pass 资源库密码 这里是qdhuang 默认的是admin ,为了安全我们可以更改密码
-dir 就是你的job在资源库中存放目录 支持中文的目录
-job job的名称 这里我的job名称就是jobname
-level 日志的级别 我们普通的写basic就可以了,就是最基本的
最后面就是日志了,针对job跑起来的相关信息都会保存在job.log中
3、针对相关的更多参数如下:
/rep : Repository name
/user : Repository username
/pass : Repository password
/job : The name of the job to launch
/dir : The directory (dont forget the leading /)
/file : The filename (Job XML) to launch
/level : The logging level (Basic, Detailed, Debug, Rowlevel, Error, Nothing)
/logfile : The logging file to write to
/listdir : List the directories in the repository
/listjobs : List the jobs in the specified directory
/listrep : List the available repositories
/norep : Do not log into the repository
/version : show the version, revision and build date
/param : Set a named parameter =. For example -param:FOO=bar
/listparam : List information concerning the defined parameters in the specified job.
/export : Exports all linked resources of the specified job. The argument is the name of a ZIP
file.
4、windows下建立执行任务

本次操作的是在windowsserver2008下

a29ebc6344564bbccb6b21e6976290f8.png

然后一步一步创建,下一步就可以了

46180985e88e456a01ac4bec3f641168.png

下一步(选择你的.bat执行文件)

b07fd61f6094fcf1f7dd4b3ac12e182e.png

下一步(选择job的执行频率)

cfefc49edf702874b447e5158bcfd498.png
0b7498a94922f0d151a2d2dc104bb29a.png

输入本服务器的密码:必须输入才可以执行job

80f196ac25f627d06e26cb8b2ff51262.png

至此就算完成了操作

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值