Re: [gentoo-user] Cron, bash, and java interacting badly?

2010-02-12 Thread Walt Rarus
On Thu, Feb 11, 2010 at 12:20 PM, Neil Bothwick n...@digimed.co.uk wrote: source /etc/profile at the top of the script often works. @Neil: Well, that does the trick! But I don't understand why. In my initial post I withheld information in order to be sure the focus wouldn't be on the

Re: [gentoo-user] Cron, bash, and java interacting badly?

2010-02-12 Thread Neil Bothwick
On Fri, 12 Feb 2010 16:57:09 -0500, Walt Rarus wrote: BTW, I love the quotations following your sig. Speaking of source, are you willing to reveal the source of these beauties? Yes, it's a place called the Internet ;-) -- Neil Bothwick CPU: (n.) acronym for Central Purging Unit. A device

[gentoo-user] Cron, bash, and java interacting badly?

2010-02-11 Thread Walt Rarus
I have a java (clojure, actually) program which is invoked via a bash script. When the script is invoked from the shell, the java program always runs and succeeds. However, when the script is invoked via a cron job, the java program always runs and crashes with a null pointer exception. Any

Re: [gentoo-user] Cron, bash, and java interacting badly?

2010-02-11 Thread Alex Schuster
Walt Rarus writes: I have a java (clojure, actually) program which is invoked via a bash script. When the script is invoked from the shell, the java program always runs and succeeds. However, when the script is invoked via a cron job, the java program always runs and crashes with a null

Re: [gentoo-user] Cron, bash, and java interacting badly?

2010-02-11 Thread Alan McKinnon
On Thursday 11 February 2010 15:40:09 Walt Rarus wrote: I have a java (clojure, actually) program which is invoked via a bash script. When the script is invoked from the shell, the java program always runs and succeeds. However, when the script is invoked via a cron job, the java program

Re: [gentoo-user] Cron, bash, and java interacting badly?

2010-02-11 Thread Neil Bothwick
On Thu, 11 Feb 2010 16:35:03 +0200, Alan McKinnon wrote: You must set up your own environment in your script run from cron. For example, you are likely missing JAVA_HOME and friends. source /etc/profile at the top of the script often works. -- Neil Bothwick If at first you don't succeed,