Cron Jobs

Discussion in 'Site & Server Administration' started by Henny, Aug 15, 2005.

  1. #1
    Hello, I need a page on my web to be executed about every 2-3 minutes. My host does not allow Crons. Does anyone know of a good alternative?
     
    Henny, Aug 15, 2005 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    If you have an "always" on Internet connection, you could setup a cron/schedule job on your home computer to make the HTTP request to your script every few minutes.
     
    digitalpoint, Aug 15, 2005 IP
  3. Henny

    Henny Peon

    Messages:
    2,118
    Likes Received:
    241
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Heh, ok, I am kind of a dummy, how the heck would I do that?
     
    Henny, Aug 15, 2005 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    It's been a long time since I've done it on Windows, but if I recall, type at //help on the Command Prompt and it will give you the syntax for setting it up. You can use wget or curl as the mechanism to make the actual HTTP request.
     
    digitalpoint, Aug 15, 2005 IP
  5. tflight

    tflight Peon

    Messages:
    617
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I remember a long time ago when I was in the same boat I setup the script (php) I wanted executed and required that script as part of another PHP page that would get traffic about every five minutes. A very poor way to do it but it worked for my needs.
     
    tflight, Aug 15, 2005 IP
  6. lorien1973

    lorien1973 Notable Member

    Messages:
    12,206
    Likes Received:
    601
    Best Answers:
    0
    Trophy Points:
    260
    #6
    If the computer is local where the script is; you can just set up a scheduled task in windows. I run a script every hour that way, but I've seen settings that go as low as a minute or so - just don't need anything to run that often.
     
    lorien1973, Aug 15, 2005 IP
  7. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You could also do something like:
    "C:\Program Files\Internet Explorer\iexplore.exe" http://www.somesite.com/page.php
    to make the HTTP request. The only problem is that it leaves an open explorer window.
     
    exam, Aug 15, 2005 IP
  8. lorien1973

    lorien1973 Notable Member

    Messages:
    12,206
    Likes Received:
    601
    Best Answers:
    0
    Trophy Points:
    260
    #8
    you could make it a batch file and close the window after x seconds too I think
    I'm sure there is a shell command to close iexplore.exe
     
    lorien1973, Aug 15, 2005 IP
  9. frankm

    frankm Active Member

    Messages:
    915
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    83
    #9
    Most easy way is to use another computers cron job. Can be your own if you are set up with ADSL/SDSL.

    and just access it remotely
    # crontab -e
    */3 * * * * lynx -dump "http://whatever .... " > /dev/null

    you can set up any old PC (486+) as a local Linux server doing this task.
     
    frankm, Aug 15, 2005 IP
  10. sadcox66

    sadcox66 Spirit Walker

    Messages:
    496
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Maybe Fake Cron : www.smarterscripts.com/cron/ will work for you.
    This is not as good as Shawns suggestion because it is based on the number of visitors to your site.
     
    sadcox66, Aug 16, 2005 IP