Welcome to WebmasterWorld Guest from 54.146.217.179

Forum Moderators: bakedjake

Message Too Old, No Replies

crontab does not find firefox

running java app

     
4:48 am on Apr 9, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:July 16, 2004
posts:48
votes: 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

4:52 am on Apr 9, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 31, 2003
posts:1316
votes: 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.

5:02 am on Apr 9, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:July 16, 2004
posts:48
votes: 0


same format as in .bashrc?

PATH=/opt/firefox2:$PATH
* * * * /blah

thanks

3:27 pm on Apr 11, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 31, 2003
posts:1316
votes: 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.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members