Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: running job through crontab

  1. #1

    Default running job through crontab

    Hi

    I am trying to run the job through crontab .If I am running the command directly.Its working.But through crontab I am getting error .
    "/home/kettle/kettle/data-integration/kitchen.sh: line 71: java: command not found".

    Even I tried putting the environment variables by setting like.


    /home/kettle/.bash_profile;
    /root/etc/profile;

    sh /home/kettle/kettle/data-integration/
    kitchen.sh -file="/home/kettle/sample/logs/sample.ktr" --level=Minimal >> /home/kettle/sample/logs/log_details.log


    the file log_details is creating.but with 0 bytes.

    Please help.

    Thanks

  2. #2
    Join Date
    Oct 2013
    Posts
    28

    Default

    Here's an example that works for me:

    crontab (runs a job every 10 minutes and sends logs to /tmp folder):
    Code:
    5-55/10 * * * * /home/scott/bin/run-jobs.sh >> /tmp/jobs.log.txt 2>&1
    And the run-jobs.sh script:
    Code:
    #!/usr/bin/env bash
    WD = /home/scott/pentaho5-ce/data-integration
    cd ${WD}
    
    ./kitchen.sh -file="/home/scott/pentaho5-ce/di-repo/testJob.kjb"

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.