Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any script or service that hits a specified website every X minutes?

share|improve this question

migrated from Nov 29 '10 at 21:10

This question came from our site for professional and enthusiast programmers.

closed as too localized by Sathya Jul 12 '11 at 5:52

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

@donald - Like apache benchmark? What is your underlying intention? – ajreal Nov 29 '10 at 21:05
it looks like how do i do SEO to me....just a thought. if that's the case, it's a fail. – RobotHumans Nov 29 '10 at 21:18
Windows or Unix? – Michael Pryor Nov 29 '10 at 23:35

To hit it every two minutes:

while true; do curl >/dev/null; sleep 120; done

If you want this to run all day and night, use some kind of job-scheduling service like cron (but no while loop, of course).

share|improve this answer
This will work, but probably end up with a pile of downloaded HTML in the directory you fire it off in :) – Chris Burgess Nov 29 '10 at 21:05
@Chris: Yeah, I know. I must have changed it to curl while you were writing your comment. :-) – Marcelo Cantos Nov 29 '10 at 21:06
wget -o /dev/null ... oh you fixed it already, right :D – Chris Burgess Nov 29 '10 at 21:06
import time
import urllib

while True:
    place = urllib.urlopen('')
    print place.code
share|improve this answer

Have you looked at curl or wget and using that in a shell script or other kind of script?

share|improve this answer

It sounds to me like curl isn't going to do it. After all, why would you repeatedly grab data unless it's changing?

I wrote a satellite photo grabber in Java because I wanted to get a satellite photo every 15 minutes.

The pseudocode looks like this:

  1. download the file
  2. compare to the last file (this can be done by comparing the length, since almost always if the length is the same, the file hasn't changed. You still have to compare the bytes, but only when the file length has not changed)
  3. if the files are the same, sleep and go back to 1
  4. if they are different write out the new one under a new sequence number (sat1.jpg, sat2.jpg, etc. store the new one as the old image for next time sleep, then go back to 1.
share|improve this answer

Though that part of your question is off-topic, for the sake of completeness: lists some web services that can do remote calls for you. The free services are not too reliable I guess, or only allow for one invocation per day.

share|improve this answer

Use wget with a cron job. at least under linux. This is how i run my backup scripts and db-syncs on my websites

share|improve this answer