| crontab does not find firefox running java app |
rus3439

msg:3622367 | 4:48 am on Apr 9, 2008 (gmt 0) | Hi, I have a java app that opens up a firefox browser and then does some checking on the page. When I run the java app from the command line in linux it works fine, but when I do the same with crontab I get the error saying that firefox-bin can't be found. Do I specify the absolute PATH to the firefox in the crontab file? Any solutions are appreciated. thanks, tatarin
|
mcavic

msg:3622368 | 4:52 am on Apr 9, 2008 (gmt 0) | Yes, just specify the path in the crontab. Cron doesn't automatically run your account's profile, so it'll be missing certain paths like /usr/local/bin.
|
rus3439

msg:3622371 | 5:02 am on Apr 9, 2008 (gmt 0) | same format as in .bashrc? PATH=/opt/firefox2:$PATH * * * * /blah thanks
|
mcavic

msg:3624624 | 3:27 pm on Apr 11, 2008 (gmt 0) | * * * * /opt/firefox2/blah Or if you need to, you can do * * * * /home/blah/script.sh And in script.sh you can set the path variable and do whatever else you need to.
|
|
|