[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 452
  • Last Modified:

c# sql threading

I want to write a Windows Service (using C# ) and my requirement is:

    When the Windows Service start - it performs record check operation (in Database) @ every 30 second interval
i check record  to process it than repeat t bcz i have news record  always insert on this table
i want life time jobs.

if we can give an example who i can do it
0
afifosh
Asked:
afifosh
1 Solution
 
apeterCommented:
Use system.threading.timer control in your windows service by setting a time span of 30 seconds . In the timer method you can query you database
0
 
Saurabh BhadauriaCommented:
you can create a SQL job with in SQLserver.  A Sql servers job are quite flexible and easily manageable.  
Chk below links for more details.

http://databases.about.com/od/sqlserver/ss/sql_server_agent_5.htm
http://msdn.microsoft.com/en-us/library/ms190268.aspx
http://blogs.msdn.com/b/sqlagent/archive/2010/10/13/creating-multi-step-sql-agent-job.aspx
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now