Hi i have script
cd /home/wasadmin/jar /usr/java/j2sdk1.4.2_12/bin/java -jar /home/wasadmin/jar/A.jar
but in mail I am getting nothing except hello.
and jar is not working as expected from this script but from command line (/usr/java/j2sdk1.4.2_12/bin/java -jar /home/wasadmin/jar/A.jar)its working.
I am running this command from /home/wasadmin/jar directory
cd /home/wasadmin/jar; /usr/java/j2sdk1.4.2_12/bin/java -jar /home/wasadmin/jar/A.jar
A few tips:
1. Try putting separate commands on separate lines, or, as suggested, put ";" to separate them.
2. Try running the script from command line before running it from cron.
3. When pasting code & commands on this forum, try enclosing them in tags. That makes it
much more readable.
4. You may need to set some environment variables (ie JAVA_HOME) for this script to work properly. You can do this at the top of your crontab settings, or by "source"ing your .bashrc (or other) file directly in the script.
|All times are GMT -5. The time now is 05:13 PM.|