Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Task Scheduler to Monitor website 1

Status
Not open for further replies.

Lotruth

Programmer
May 2, 2001
133
US
I want to use task scheduler to monitor hourly changes in someone else's homepage.

I want to monitor the number of listeners our internet radio get per hour at the shoutcast website.

Can scheduler do an hourly print screen automatically? I really only need one bit of information from the page, but this is the only way I can think of to get it. It would be even better if it could update date a text file (like a log) as this would same on hard drive usage. If you have any ideas, I would appreciate it. Thanks.
 
You could write or find a screen scraping program & use the scheduler to fire it off when you want. Such a program could easily write to a log file. Do a few searches for "screen scraping" on the web & post back with your results! Good luck!

X
 
I found some stuff on this topic, but it was over my head. However, I did find a program that does automatic print screen tasks. Now the problem is getting the web page to automatically refresh itself just before the snapshot is taken. Any suggestions on this one? Thanks guys.
 
I'm assuming your using Internet Explorer...
Go into the properties of Internet Explorer and under the "General" tab select "settings". Now you should see an option labeled "Check for newer versions of stored pages" & select "Every visit to the page". If this doesn't work, check this article out.

Let us know your results!

X
 
Thank you. I think this solution is for files stored in favorites so you actually have to revisit the page manually for this solution to be relevant.

I have a computer, that I use to view the page in question. I leave it on and at that page. Every hour, it takes a print screen of the computer which has the page open. However, an hour later it takes another one of the same page but with the data from an hour ago and not the current hour. I need the page to refresh itself every hour right before the new print screen is made.

Thanks for the ideas. This is a tough one.
 
Might be a dumb question but, have you tried putting the site in question and saving to favorites then test it? If this doesn't work, you could have a script/program to clear all Internet files(cookies,history...) before the screen scraping program runs.

X
 
What about using the task scheduler's ability to terminate an app after so many minutes? Set up the TS job to run IE once per hour and set it to terminate IE after it runs for 10 minutes. Set the screen capture utility to run once per hour, 5 minutes after IE runs. Configure IE's home page on that computer to the page you're capturing.

It's a long shot but it might work.

Mike Krausnick
Dublin, California
 
You win the prize. No really, I tried that like an hour ago and it worked. Before, I thought TS only worked daily, not hourly. Great minds think alike. Thanks everyone for all the help.
 
Works wonderfully except of one flaw. I cannot get TS to close the browser after the screen capture. When I try, it terminates the task altogether so that it does not run on the next hour. Currently, it opens a new browser window every time and this works perfectly as far as the screen capture. However, I have 24 browser windows opened every day. How can I close these automatically?
 
Yeah, I figured if there was a way for it not to work, that would be it. I think you're left with
a) closing 24 windows every morning, or
b) using a programming language to control it, like javascript or a .NET language. With Javascript, you can open a URL in a window and then close it after a time (I think, I'm not really a JS expert)
In Visual Basic (or any other .NEt language for that matter) you can create an IE browser object, navigate to the URL, then destroy the object after a delay, which will make the IE go away. Put it in a loop and run it 'till forever.

On second thought:

How about configuring another task to reboot the computer every 24 hours to get rid of all the IE windows. Some method of automatically logging in after the reboot would be required. Google on reboot utilities, there's a ton of them out there. Win2K3 server has one built in, but I don't know about other OS's.




If you posted in the Javascript forum, maybe some kind JS guru would provide a routine that would work.



Mike Krausnick
Dublin, California
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top