• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Crontab for running executable jar is not working

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!).
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic