Describe:
Using bat to schedule ktr stored in a resource pool under Windows
Preparation environment:
1.KTR file (the ktr must be stored in the Resource management library)
2.bat file
@echo offd:cd D:\software\pdi-ce-5.4. 0.1-\data--rep lj-user admin-pass admin-dir-trans a-level=basic >d:\test.logpause
Note: The red tag code in the above code is important to note that if the job is executed, then it needs to be modified to-job
The execution results are as follows: Test.log
debug:using java_homedebug: _pentaho_java_home=D:\software\JDKDEBUG: _pentaho_java=d:\software\jdk\bin\java.exed:\software\pdi-ce-5.4.0.1- the\data-integration>"D:\software\JDK\bin\java.exe" "-xmx512m" "-xx:maxpermsize=256m" "-djava.library.path=libswt\win32" "-dkettle_home=" "-dkettle_repository=" "-dkettle_user=" "-dkettle_password=" "-dkettle_plugin_packages=" "-dkettle_log_size_limit=" "-dkettle_jndi_root="-jar launcher\pentaho-application-launcher-5.4.0.1- the. Jar-lib. \libswt\win32-main org.pentaho.di.pan.pan-rep lj-user Admin-pass Admin-dir/-trans A-Level Basic ./ One/ One -: -: --Pan-log level: Basic log ./ One/ One -: -: --Pan-start running. ./ One/ One -: -: --Repositoriesmeta-reading repositories XMLfile: C:\Users\QIN\.kettle\repositories.xml ./ One/ One -: -: -Ato convert the release of the patch start [A] ./ One/ One -: -: --Table output.0-Connected to Database [DB2] (commit= +) ./ One/ One -: -: Geneva-Table input.0-finished reading query, closing connection. ./ One/ One -: -: Geneva-Table input.0-Complete processing (i=1, o=0, r=0, w=1, u=0, e=0 ./ One/ One -: -: Geneva-Table output.0-Complete processing (i=0, o=1, r=1, w=1, u=0, e=0 ./ One/ One -: -: Geneva-Pan-Done! ./ One/ One -: -: Geneva-Pan-start = ./ One/ One -: -:27.137, stop = ./ One/ One -: -:02.416 ./ One/ One -: -: Geneva-Pan- *seconds after processing is complete. ./ One/ One -: -: GenevaA ./ One/ One -: -: Geneva-A-Process table input.0The successful end of the process1Line. (0Lineseconds) ./ One/ One -: -: Geneva-A-Process table output.0The successful end of the process1Line. (0Rows/sec)
Using bat to schedule ktr stored in a resource pool under Windows