Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Bat Job not executing

  1. #1
    Join Date
    Nov 2013
    Posts
    14

    Default Bat Job not executing

    Hi All

    I am hoping you can help
    i am very new to Pentatho kettle and having a few issues


    Problem -When i run my job manually it works, what i am trying to do is create a schedule task (Runs the batch file at a given time and populates my database with data)

    I have installed Pentaho at the following pathway C:\Pentaho

    My Jobs are saved in this pathway C:\Pentaho_Jobs
    Within C:\Pentaho_Jobs i have a folder called “ExtractClientlineCase”
    Within that folder i have four files “ExtractClientlineCase.kjb,
    ExtractClientlineCase.ktr,
    log.txt,
    RunJob.bat)

    When edit RunJob.Bat it opens up in notepad and the code is “
    SET PATH=%Path%;"C:\Pentaho"
    @echo New job started via batch execution %date%
    kitchen.bat /file:"C:/Pentaho_Jobs/ExtractClientlineCase/ExtractClientlineCase.kjb"
    >> C:\Pentaho_Jobs\ExtractClientlineCase\log.txt


    I have installed at the following pathway C:\Program Files\Java

    I go into C:\Pentaho and edit Kitchen.bat
    And the code is “
    @echo off
    setlocal
    set CWD=%CD%
    cd /D %~dp0
    REM **************************************************
    REM ** Kettle home **
    REM **************************************************
    if "%KETTLE_DIR%"=="" set KETTLE_DIR=%~dp0
    if %KETTLE_DIR:~-1%==\ set KETTLE_DIR=%KETTLE_DIR:~0,-1%
    cd %KETTLE_DIR%
    call "%~dp0set-pentaho-env.bat"
    REM ******************************************************************
    REM ** Set java runtime options **
    REM ** Change 512m to higher values in case you run out of memory **
    REM ** or set the PENTAHO_DI_JAVA_OPTIONS environment variable **
    REM ******************************************************************
    if "%PENTAHO_DI_JAVA_OPTIONS%"=="" set PENTAHO_DI_JAVA_OPTIONS=-Xmx512m
    set OPT="%PENTAHO_DI_JAVA_OPTIONS%" "-Djava.library.path=%KETTLE_DIR%\libswt\win32" "-DKETTLE_HOME=%KETTLE_HOME%" "-DKETTLE_REPOSITORY=%KETTLE_REPOSITORY%" "-DKETTLE_USER=%KETTLE_USER%" "-DKETTLE_PASSWORD=%KETTLE_PASSWORD%" "-DKETTLE_PLUGIN_PACKAGES=%KETTLE_PLUGIN_PACKAGES%" "-DKETTLE_LOG_SIZE_LIMIT=%KETTLE_LOG_SIZE_LIMIT%" "-Dhttp.proxyHost=proxy1.fdms.1dc.com" "-Dhttp.proxyPort=80"
    REM ***************
    REM ** Run... **
    REM ***************

    cd /D %CWD%
    "C:\Program Files\Java\jre6\bin\java.exe" %OPT% -jar "%KETTLE_DIR%\launcher\launcher.jar" -main org.pentaho.di.kitchen.Kitchen %*

    Is there anything set up incorrectly ?

  2. #2
    Join Date
    Jun 2006
    Posts
    282

    Cool

    Hi Masond. It's not clear if you are able to successfully run the batch manually and are just having issues with the scheduled task not working. If the problem is just the scheduled task, make sure you have the "Start In" option filled in within the task scheduler action. You may need to also include C:\Pentaho_Jobs in your set path statement. I'm not sure why you are altering your kitchen.bat file as that not usually required in most cases.

    Name:  scheduled_job.jpg
Views: 53
Size:  23.7 KB
    Last edited by microdisney; 11-15-2013 at 04:20 AM.
    "If you want to increase your success rate, double your failure rate."
    Thomas Watson, Sr (former president of IBM)

  3. #3
    Join Date
    Nov 2013
    Posts
    1

    Default

    Hi masond, I too faced same issue. Here when you calle kitchen.bat in your bat file mention the path of kitchen file. here is correct command Fullpath/kitchen.bat /file:"C:/Pentaho_Jobs/ExtractClientlineCase/ExtractClientlineCase.kjb" hope this helps you.

  4. #4
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    What is the content of C:\Pentaho_Jobs\ExtractClientlineCase\log.txt after you run the job?
    **THIS IS A SIGNATURE - IT GETS POSTED ON (ALMOST) EVERY POST**
    I'm no expert.
    Take my comments at your own risk.

    PDI user since PDI 3.1
    PDI on Windows 7 & Linux

    Please keep in mind (and this may not apply to this thread):
    No forum member is going to do your work for you. We will help you sort out how to do a specific part of the work, as best we can, in the timelines that our work will allow us.
    Signature Updated: 2014-06-30

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.