Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Cron, bash, and java interacting badly?
Date: Thu, 11 Feb 2010 14:37:44
Message-Id: 201002111635.03252.alan.mckinnon@gmail.com
In Reply to: [gentoo-user] Cron, bash, and java interacting badly? by Walt Rarus
1 On Thursday 11 February 2010 15:40:09 Walt Rarus wrote:
2 > I have a java (clojure, actually) program which is invoked via a bash
3 > script. When the script is invoked from the shell, the java program always
4 > runs and succeeds. However, when the script is invoked via a cron job, the
5 > java program always runs and crashes with a null pointer exception.
6 >
7 > Any thoughts on how to debug the situation?
8
9 Same resolution as every other time cron errors come up:
10
11 cron does NOT run in a shell with an environment. It does not use
12 /etc/profile.
13
14 You must set up your own environment in your script run from cron. For
15 example, you are likely missing JAVA_HOME and friends.
16
17
18 --
19 alan dot mckinnon at gmail dot com

Replies

Subject Author
Re: [gentoo-user] Cron, bash, and java interacting badly? Neil Bothwick <neil@××××××××××.uk>