Results 1 to 2 of 2
Hello all.
I have a script that has the line it and am trying to run that script as a cron job.
Code:
firefox ~/callGlenn.html & sleep 20
It works ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-10-2006 #1Just Joined!
- Join Date
- Feb 2004
- Location
- I'd rather be in Hawaii
- Posts
- 52
Calling website from cron job.
Hello all.
I have a script that has the line it and am trying to run that script as a cron job.
It works fine when I start the script manually, but crashes when it is called by cron. The error in the output mail is:Code:firefox ~/callGlenn.html & sleep 20
What this script is doing is calling a local html page, that runs a javascript file, which in turn downloads a cgi script for a RealPlayer stream. This stream file is then parsed and recorded using mplayer, then converted to an mp3 with lame.Code:xterm: DISPLAY is not set
How do I set the display for xterm. I looked thorugh the man page, but it only gave a very vague description of what the display actually was for.
If any one could tell me how to accomplish this I would be very grateful. Or if there is a method other than using a web browser to basically "click a link" on some webpage I would love to hear about it.
Thanks in advance.
- 03-10-2006 #2
I would imagine that $DISPLAY is the variable holding the address of the X Server, and since cron is not being run from an X Server, this is empty.
Having said that, I would imagine that you could call a script like the following from cron (assuming, of course, that you have an X Server running somewhere):
Alternatively, this might work:Code:DISPLAY=:0.0 firefox ~/callGlenn.html & ffpid=$! sleep 20 kill $ffpid
But I make no promises on the latter.Code:wget --spider -i ~/callGlenn.html
Try these and lemme know if they work.


Reply With Quote
