Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Schedule a job on Unix

  1. #1
    Join Date
    Jul 2009
    Posts
    8

    Question Schedule a job on Unix

    Hi!
    I have create a shell script that runs the jobs I need. Then I want to schedule this script to run.
    On Unix I entered the following command:
    crontab -e

    then,I enter these lines in a crontab:

    20 16 * * * /home/test/testYB.shThe content in testYB.sh like these,sh /home/test/data-integration/kitchen.sh -file="/home/test/data-integration/Real/YesAdd.kjb" --level=Minimal > /home/test/trans.log

    But it can't work,I try the script directly,then it could work.
    I read the Kitchen User Documentation ,but it dosn't have any content about "/PROD/update_dimensions.sh"
    I really need your help. Thank you very much!!

  2. #2
    Join Date
    Feb 2009
    Posts
    296

    Default

    Any errors in the e-mail cron sent you?
    Fabian,
    doing ETL with his hands bound on his back

  3. #3
    Join Date
    Jul 2009
    Posts
    8

    Thumbs up

    Firstly,thank you for your help, fabianS!

    I don't konw the address of mail...

    I try nohup like this,
    nohup sh /home/test/testYB.sh &>>/home/test/no.log


    the content of no.log is that,
    /home/test/data-integration/kitchen.sh: line 61: java: command not found


    what's the mean?

  4. #4
    Join Date
    Feb 2009
    Posts
    296

    Default

    It means that the executable 'java' could not be found. This usually means that your environment within the cronjob is not set up. You, for example, don't have the PATH set.

    Ask your system administrator how to load the proper environment in your operating system. In Linux we usually use 'source ~/.profile'. Other systems work differently.

    You can test if your environment is set up properly by inserting an "echo $PATH" in your "/home/test/testYB.sh".

    I also suggest that you divert the standard output to another file than the standard error: "sh /home/test/testYB.sh >>/home/test/no.log &2>>/home/test/errorlog.log"

    BTW: nohup is not needed if you start the job via cron.
    Fabian,
    doing ETL with his hands bound on his back

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.