Find the answer to your Linux question:
Results 1 to 3 of 3
Hi all I want to schedule a program through cron. When I run it from the command line, it works fine... But when it comes to cron, it doesn't work. ...
  1. #1
    Just Joined!
    Join Date
    Nov 2007
    Posts
    3

    cron job problem

    Hi all
    I want to schedule a program through cron. When I run it from the command line, it works fine... But when it comes to cron, it doesn't work.
    To give you more clues, it is a java .jar file, which must be run with java. It connects to an Oracle database, so it needs to access Oracle JDBC drivers. It must be set through LD_LIBRARY_PATH. I've set the correct value, and I am sure that when system starts up, it sets correctly (I've set it in /etc/profile.local). As I've said, it works fine when I run it from the command line. But when I tried to run it from cron, it generates some errors which indicates that it doesn't recognized LD_LIBRARY_PATH. I put LD_LIBRARY_PATH in cron, without any success.

  2. #2
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    When running from the command line what user are you?

  3. #3
    Just Joined!
    Join Date
    Nov 2007
    Posts
    3
    command line: root

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...