We help IT Professionals succeed at work.

asp.net, c# how to schedule a web page to run every hour

R8VI
R8VI asked
on
Medium Priority
919 Views
Last Modified: 2013-12-17
Hi,

I have a webpage that in the back end c# code quries an xml file and puts the data in the database.

I want to automate this so that it kkicks off every hour, how is this possible.

Can someone give me some coding examples please and direct me how i would go about doing this
Comment
Watch Question

Faizan SarwarSoftware / Database Developer
CERTIFIED EXPERT

Commented:

Author

Commented:
hi,

Thanks for the responce if i am not mistaken this code would work if that page got hit.

But in my code the page will never get hit its just there if that makes sense sorry

thanks,

R8vi

Hi'
Simple solution is
open the url from the browser create short cut for that.
In IE right clik in blank area of the browser window and select "Create Shortcut" from the context menu
or drag drop the address bar fav icon to the folder

this above operation create a web short cut
copy and paste the short cut in the folder where you want.
in the schedule task call browse and choose the file.

thats all.
this will start and run based on your schedule task

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Faizan SarwarSoftware / Database Developer
CERTIFIED EXPERT

Commented:
>> I have a webpage that in the back end c# code quries an xml file and puts the data in the database

To execute this process we need to hit this page.

Commented:
A webpage is not meant for that purpose.
The way to do it is to write a Windows Service and run it on a timer.
Faizan SarwarSoftware / Database Developer
CERTIFIED EXPERT

Commented:
The processes explained in this article will be executed in the background i.e. aspx page will not popup
http://www.codeproject.com/KB/aspnet/ASPNETService.aspx
Faizan SarwarSoftware / Database Developer
CERTIFIED EXPERT

Commented:
in my implementation i needed to execute Stored Procedure every three hours
>Store proc call is in aspx page load event
>process in global.asax page hit this aspx page in the background so no popups

hope that helps
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.