0

I am developing a website in ASP.NET that will need to send a call to a remote web service on a daily basis to get results and store these in the database.

My question is how do I do this on a scheduled basis.

Am I correct in saying that the Application_Start method in Global.asax is only triggered when a user downloads a copy of the Default.aspx page?

I need to ensure that this web service call runs separately from the calls to the site itself, therefore running in own thread, but how do I achieve this if the website is hosted by a remote Web Host? What access would I need to the remote web server?

leeb898
  • 152
  • 2
  • 10
  • See above. Recommendation is to use Timers or Quartz.Net if you must stay within your Web app, or use Windows Scheduled Tasks and just write a simple console app. – Brendan Hannemann Feb 07 '13 at 19:59

1 Answers1

0

I do this by setting up a cronjob on my web-hotel that calls a given page (ex. cronservice.aspx) every minute, but you can choose your own time intervals when setting up the cronjob.

From the code of cronservice.aspx you can do whatever you want.

So check if you have that option in your hosting environment.

Jesper R. Hansen
  • 405
  • 1
  • 4
  • 16
  • I have contacted the Web hosts and they have a Task Scheduler that I can call a background page to call the Web Service... – leeb898 Feb 08 '13 at 11:41