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 |