homepage Welcome to WebmasterWorld Guest from 54.167.10.244
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved