The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Crontab not recognizing the jar files rajuutla UNIX for Dummies Questions & Answers 4 05-01-2008 11:20 PM
Crontab not recognizing the jar files rajuutla Linux 3 05-01-2008 05:27 AM
Can crontab execute binary files? Tris UNIX for Dummies Questions & Answers 5 12-07-2006 10:16 AM
recognizing *.* in find amarnath Shell Programming and Scripting 3 07-17-2006 03:24 AM
recognizing * character csejl Shell Programming and Scripting 3 11-15-2005 10:55 PM

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-30-2008
Registered User
 

Join Date: Apr 2008
Posts: 5
Question Crontab not recognizing the jar files

Hi All,
I am using crontab which execute a shell script.
In the shell script, I am executing a java program. This Java program requires the jar files.
The cron job file ' cronfile.txt ' contents:

MAILTO="raju_utla@dcis.uohyd.ernet.in"
0-59 * * * * ./cronfile.sh >> /home/rajuutla/FilesForCronJob/logFileForCron.log

The shell script( cronfile.sh ) contents :
#!/bin/bash
#check weather server prog is running or not
test=`ps aux | grep -c java\ PostgresServer`
JAVA_HOME=/opt/SDK/jdk
CLASSPATH=/home/rajuutla/pg74.jdbc3.jar:.
if [ $test -eq 1 ]
then
echo `date`
$JAVA_HOME/bin/java -classpath $CLASSPATH PostgresServer

fi

The java program 'PostgresServer' which i am executing requires the jar file
'pg74.jdbc3.jar' mentioned above.

The problem is, directly running the above shell script with out cron, I am able to get the results. But when I use the crontab to run the java program I am not able to get the results.

What may be the problem? How to resolve this problem? I am unable to find it out.
Please help me.
Thanks to All.
Raju
Google UNIX.COM
Forum Sponsor
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:35 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0