Welcome to WebmasterWorld Guest from 54.146.246.4

Forum Moderators: bakedjake

Message Too Old, No Replies

crontab does not find firefox

running java app

     

rus3439

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

10+ Year Member



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

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

WebmasterWorld Senior Member 10+ Year Member



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

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

10+ Year Member



same format as in .bashrc?

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

thanks

mcavic

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

WebmasterWorld Senior Member 10+ Year Member



* * * * /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.