LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Crontab path when execute a job (https://www.linuxquestions.org/questions/linux-newbie-8/crontab-path-when-execute-a-job-799490/)

j-me 04-01-2010 09:13 PM

Crontab path when execute a job
 
I have and entry in a crontab for my user (appadmin) that when it executes it does not start with the proper path. It needs to start as the appadmin user as appadmin owns all the directories for glassfish.

00 01 * * * appadmin /home/appadmin/scripts/restartProdSubDomainandNode.sh

However, once glassfish restarts, the hudson application cannot find the default JDK. I get an error.
If I initiate the restart via command line, all works as it should.

I believe it has something to do with PATH in the crontab but am not sure what I need to set the PATH to in crontab. Here is what I think ... you guy can weigh in on this ...

PATH=/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/bin:/opt/gnome/bin:/opt/kde3/bin:/usr/sbin:/sbin:/opt/SUN/jdk1.6.0_04/bin
As always, appreciate your input ...

troop 04-01-2010 09:33 PM

http://www.linuxquestions.org/questi...d-cron-796412/


All times are GMT -5. The time now is 03:05 PM.