• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Crontab for running executable jar is not working

 
SaiManasa Dasari
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18108
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!).
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic