| Author |
Crontab for running executable jar is not working
|
SaiManasa Dasari
Greenhorn
Joined: Aug 21, 2012
Posts: 27
|
|
Hi
I added following entry in the crontab to run the executable jar for particular time.
07 15 * * * root /usr/bin/java -jar /home/localhost/UpdateJarFolder/Update.jar
Update.jar is my executable jar..My problem is its not running this executable jar..In logs it is showing as
Jan 7 15:00:01 smdasari CRON[6528]: (root) CMD (/usr/bin/java -jar /home/localhost/UpdateJarFolder/Update.jar)
Jan 7 15:00:01 smdasari CRON[6527]: (CRON) info (No MTA installed, discarding output)
Is MTA required for running executable jar??It is working fine for executing the command from shell.I am using Ubuntu Os.Please help me to solve this.
Thanks in advance.
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14568
|
|
MTA stands for Mail Transfer Agent, I think, so apparently the app runs, but cannot use its email services.
I recommend that when running Java via cron that you place the actual Java command in a script file and let cron run the script instead. It makes things a little simpler. You can run the script directly for debugging purposes (which is something I spent too much time doing just the other day!).
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24081
|
|
Tim Holloway wrote:MTA stands for Mail Transfer Agent, I think, so apparently the app runs, but cannot use its email services.
I think the message is from cron actually -- it wants to mail you the output from the Java program, but it can't, because it can't find an MTA.
|
[Jess in Action][AskingGoodQuestions]
|
 |
 |
|
|
subject: Crontab for running executable jar is not working
|
|
|