.NET timing

  • Thread starter Thread starter Jocab
  • Start date Start date
J

Jocab

Suppose I want to write an application which checks data every 3
hours, either from a webservice (somewhere else) or a remote website
(using regular expressions). Every 3 hours, it should check and write
the new figures into a MS SQL Server database. How could I do this?
Only the website which would use this information afterwards would be
in ASP.NET...
 
In your Application_OnStart Event Handler, create a class which is stored
permanently in the Application Cache. The class will implement a timer that
fires an Elapsed event every 3 hours, and has an Event Handler for that
Event which performs the work you described.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
In your Application_OnStart Event Handler, create a class which is stored
permanently in the Application Cache. The class will implement a timer that
fires an Elapsed event every 3 hours, and has an Event Handler for that
Event which performs the work you described.

So it's good to do this in ASP.NET after all? Isn't it better to write
a separate application in SQL itself or in some other language?
 
As this is the ASP.Net newsgroup, I assumed you were asking how to do this
with ASP.Net. Of course you could certainly write a Service that runs
independently to do this.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
As this is the ASP.Net newsgroup, I assumed you were asking how to do this
with ASP.Net. Of course you could certainly write a Service that runs
independently to do this.

You mean a Windows system service? How would I do that?
 
Well, if you have Visual Studio.Net, you just create a new Project that is
a Windows Service Project.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Well, if you have Visual Studio.Net, you just create a new Project that is
a Windows Service Project.

Can such a Service do anything that asp.net can do
(non-interactively)? Like connect to a web service or do screen
scraping using regular expressions on a website? How would I go about
doing the latter?
 
Back
Top