Solved

How to call a web page automatically

Posted on 2009-05-14
7
328 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
convert html to string 6 34
Simple Injector with Web Service 4 40
help with regular expression to search string 6 24
Batch file or script with password 22 43
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

770 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