Results 1 to 2 of 2
Hi!
I've got a url (for example http://mysite.com/mycode.php?parameter1&parameter2" that I run regularly on my browser to perform updates on my site's db. I decided to run it via lynx and ...
- 03-13-2009 #1Just Joined!
- Join Date
- Mar 2009
- Posts
- 1
lynx in shell script
Hi!
I've got a url (for example http://mysite.com/mycode.php?parameter1¶meter2" that I run regularly on my browser to perform updates on my site's db. I decided to run it via lynx and cron it instead, but I've run into problems.
When I run "lynx http://mysite.com/mycode.php?parameter1¶meter2" from the command prompt, it immediately goes into the background. I suppose that's fine, and stays there until it ends about 10 to 15 minutes later (it's a long process). But when I put it in a script called "phpcron" like this:
#!/bin/bash
lynx http://mysite.com/mycode.php?parameter1¶meter2"
exit 0
and then when I run that script, i.e.:
# ./phpcron
it ends immediately. Not even in the background where it's supposed to be running.
Is there something I missed? Eventually, I'd like to add that script to my crontab and be done with it, but it's giving me headaches.
- 03-14-2009 #2Linux Newbie
- Join Date
- Feb 2009
- Location
- Third ring of Pergatory
- Posts
- 199
try
rxvt -e lynx http://mysite.com
Otherwise, the terminal it's running in exits as soon as execution passes to the next line in the script-at least that's my best guess


Reply With Quote