Solved

How to call a web page automatically

Posted on 2009-05-14
7
325 Views
Last Modified: 2013-11-07
How to call a web page automatically everyday once at a specific time without any user interaction.
Any help will be appreciated
0
Comment
Question by:dotsandcoms
  • 4
  • 3
7 Comments
 
LVL 39

Expert Comment

by:abel
ID: 24384631
What about using WebClient? Try this to save it locally (in case you want to reference the output later). You can use the windows scheduler to run your application once a day.

// download googles main page

WebClient Client = new WebClient();

Client.DownloadFile("http://www.google.com", "d:/temp/google.html");

Open in new window

0
 

Author Comment

by:dotsandcoms
ID: 24393716
We are trying to close other related question and we accidently close the question.
0
 
LVL 39

Expert Comment

by:abel
ID: 24393956
aha ;). Np.
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:dotsandcoms
ID: 24507863
oh, I am so sorry for the late reply,  Abel , can you please help me out with the steps for setting up the window schedular. What i want is to call a web page on whose pageload event i am inserting RSS feeds into my database.

Thanks alot
0
 
LVL 39

Expert Comment

by:abel
ID: 24508764
On Vista, you find it at Start > All Programs > Accessories > System Tools > Task Scheduler (I believe that is the same on other windows, but you can always type "taskschd" in the Run window if you cannot find it).

The Task Scheduler is quite self-explanatory, but quite different on different windows versions. On Vista, you can click "Create Basic Task" and follow the steps of the wizard. In the action step you can simply browse for the little program you created for calling your page.

-- Abel --
0
 

Author Comment

by:dotsandcoms
ID: 24569313
hi abel, is there any other way i can perform the task (calling a webpage automatically )  rather than using window scheduler, as the server on which i have my project does not allow this facility to the client.

Thanks
           
           
0
 
LVL 39

Accepted Solution

by:
abel earned 500 total points
ID: 24569998
You can of course write your own scheduler tool, shouldn't be so hard, but it's a bit odd if they don't allow you to run an application through the scheduler but they would allow you to create your own scheduler application. The existing scheduler is a time tested and well-supported feature, though it is not hard to create one yourself, it is almost always better to use proven technology then reinventing it yourself.

What you can do yourself is either download another scheduler tool (try google, there are many freeware and open source available) or roll out your own. In C# this is easy, you can simply use the timer control. It takes milliseconds, which means you need to set the timeout value to 86400000 milliseconds to have it wait exactly one day. Run your app, never close it, and the timer does the rest.

-- Abel --


0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now