Re: Passing environment to cron

2007-10-21 Thread Arun
gt; Archie > > > -----Original Message- > From: Arun [mailto:[EMAIL PROTECTED] > Sent: Saturday, October 20, 2007 11:41 AM > To: Ant Users List > Subject: Re: Passing environment to cron > > Scot, > > Ok, > yes a crontab calls the perl script and executes the an

RE: Passing environment to cron

2007-10-21 Thread Russell, Archie
that says $ENV{"CATALINA_HOME"} = "whateverpathyouwant"; Archie -Original Message- From: Arun [mailto:[EMAIL PROTECTED] Sent: Saturday, October 20, 2007 11:41 AM To: Ant Users List Subject: Re: Passing environment to cron Scot, Ok, yes a crontab calls the perl script and

Re: Passing environment to cron

2007-10-20 Thread Scot P. Floess
Arun: To be honest, I am not sure as I don't know Perl... However, if I were to execute this in a bash script: `. /root/.bashrc`; It wouldn't apply the .bashrc settings to my current shell... Not sure if this is also true in Perl... Scot Arun wrote: Scot, Ok, yes a crontab calls the pe

Re: Passing environment to cron

2007-10-20 Thread Arun
Scot, Ok, yes a crontab calls the perl script and executes the ant script. The line `ant -logfile build.log` executes the ant. But I sourced the bashrc in perl. But still the same. Any ideas.? On 10/20/07, Scot P. Floess <[EMAIL PROTECTED]> wrote: > > Arun: > > Sorry I don't know any Perl :( > >

Re: Passing environment to cron

2007-10-20 Thread Scot P. Floess
Arun: Sorry I don't know any Perl :( So what is the problem exactly? You are trying to run this from Perl or a crontab that calls a Perl script who executes your Ant script? I'm not following the problem :( Sorry about that... Arun wrote: Scot, Thanks a lot for the reply. You are correct.

Re: Passing environment to cron

2007-10-20 Thread Arun
Sorry for putting in to, I just cliked reply and gmail added you too in reply list. On 10/20/07, Arun <[EMAIL PROTECTED]> wrote: > > Scot, > Thanks a lot for the reply. You are correct. I was not sourcing it . But > When I echo the variable CATALINA_HOME from perl script it is an empty > string ca

Re: Passing environment to cron

2007-10-20 Thread Arun
Scot, Thanks a lot for the reply. You are correct. I was not sourcing it . But When I echo the variable CATALINA_HOME from perl script it is an empty string causing the same effect. Take a peek at my perl script which runs as cron task. This script updates from sourceforge cvs and redeploys to tomc

Re: Passing environment to cron

2007-10-20 Thread Scot P. Floess
Sorry, by script I mean something that resembles the cron entry I listed... Scot P. Floess wrote: Arun: I believe your problem is related to the way in which cron is running. I don't believe your .bashrc is being sourced. You may need to either write a script to kick off your ant tasks or p

Re: Passing environment to cron

2007-10-20 Thread Scot P. Floess
Arun: I believe your problem is related to the way in which cron is running. I don't believe your .bashrc is being sourced. You may need to either write a script to kick off your ant tasks or perhaps make the cron entry resemble something like . ~/.bashrc ; ant -f [dir to build.xml]/build.

Passing environment to cron

2007-10-20 Thread Arun
Hi, have a problem running ant script as a cronjob. The cron tells BUILD FAILED /home/build/mobchannel/mobchannelWEB/build.xml:230: /home/build/mobchannel/mobchannelWEB/${env.CATALINA_HOME}/bin not found. But when I directly execute the build.xml using ant this error does not occur.