Super Basic Script Need

Discussion in 'Programming' started by jawinn, Apr 27, 2006.

  1. #1
    I need a script that will hit a URL at recurring intervals throughout the day. I would like to be able to just start it and let it run on a server in my office. Any ideas on where I could find something like this? I'd do a search but I really don't know what to search for.

    thx
     
    jawinn, Apr 27, 2006 IP
  2. woodside

    woodside Peon

    Messages:
    182
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you have a unix box, all you need to do is use cron and curl.

    Cron is a task scheduler and curl will just grab a url.

    If it's a windows box, you can use task scheduler and then write a little batch file that you can schedule. Just write a batch file that telnets to port 80 of the website you want then does "Get /".

    -Erik
     
    woodside, Apr 27, 2006 IP
    kkibak likes this.
  3. jawinn

    jawinn Active Member

    Messages:
    1,024
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    88
    #3
    the problem is that I don't have a unix machine to run this and I know jack about writing batch files. Could I have the file be started by task scheduler and then run several times a day?
     
    jawinn, Apr 27, 2006 IP
  4. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Check out VisualCron from http://www.visualcron.com . Note, I've never used it and only just found it then.

    However, it's free and allows you to add HTTP jobs (as in jobs that will hit a URL)...
     
    TwistMyArm, Apr 27, 2006 IP
  5. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #5
    TwistMyArm, Apr 27, 2006 IP
  6. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #6
    How often do you want it to run?

    You could just leave your browser open with a meta refresh every 10 minutes or something if you want to avoid a cron job.

    Or you could use AJAX to load the page every 10 minutes and have a JS to count the time

    Maybe if you explained what the script is going to do we can suggest the best solution.:)
     
    mad4, Apr 27, 2006 IP
  7. woodside

    woodside Peon

    Messages:
    182
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Depending on how often you want a page hit, you could just use a website monitering service that checks a site every so often. Just give it the page you want hit. Some of the free ones don't check it all that often so it would depend on the frequency you needed. There are a bunch out there, here is one.
     
    woodside, Apr 27, 2006 IP
  8. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #8

    I have seen a script that runs on the windows desktop and does what you want to do. So as Mulder would say, "it's out there".

    If I find it I will post the link.
     
    Colbyt, Apr 27, 2006 IP
  9. jawinn

    jawinn Active Member

    Messages:
    1,024
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    88
    #9

    I'd like it to run every hour or couple of hours. I need a script that will call or hit (sorry if i don't know the correct term :confused: ) a URL.

    For example the URL www.site.com/site/sitescript.php. I know I could do this with a browser refreshing the page every hour or so but I'd rather have a script running on a server do this because I feel it would be more reliable.

    To clarify, my server is not the server hosting the site. The site is sitting on a shared hosting account at godaddy.
     
    jawinn, Apr 27, 2006 IP
  10. jawinn

    jawinn Active Member

    Messages:
    1,024
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    88
    #10
    Awesome thanks!
     
    jawinn, Apr 27, 2006 IP
  11. jawinn

    jawinn Active Member

    Messages:
    1,024
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    88
    #11
    For anyone interested, I found a pretty slick web based cron job service. It is exactly what I was looking for. You can find it here: http://www.webbasedcron.com/index.php

    Thanks for everyone's help.
     
    jawinn, Apr 28, 2006 IP
  12. sadcox66

    sadcox66 Spirit Walker

    Messages:
    496
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #12
    I am late to this party but here is something else you can do.

    Use microsoft scheduler it is already on your computer.
    Click the help button on your Start button and look for Scheduled Tasks
     
    sadcox66, Apr 30, 2006 IP