Find the answer to your Linux question:
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 ...
  1. #1
    Just 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&parameter2" 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&parameter2" 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&parameter2"
    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.

  2. #2
    Linux 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...