Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# trigger
I am looking to do an action on every day at a particular time like triggers in sql, but here i am looking to do this in c#.net, can any one please help me,
 
Thanks
Posted 23-Aug-12 1:28am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

  Permalink  
Comments
Manas Bhardwaj at 23-Aug-12 7:36am
   
very good +5!
Prasad_Kulkarni at 23-Aug-12 7:40am
   
:) Thank you Manas!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

1.) Use a windows service.
2.) Schedule your application using Windows Schedular.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

It depends on the action itself. Ex:
- SQL Server: Schedule a job in SQL Server Agent (http://msdn.microsoft.com/en-us/library/ms191439.aspx[^], SQL Agent: A Job Scheduler Framework[^])
- Using a scheduler service (A New Task Scheduler Class Library for .NET[^], http://kodethoughts.blogspot.fr/2009/06/creating-windows-task-scheduler-service.html[^] )
- Using the system task scheduler: http://taskscheduler.codeplex.com/[^]
 
So if your purposes does not fit in the scope of these approaches, please elaborate your question a little more.
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Thanks all for your solutions I got a mixed one from all by creating a windows service and adding a timer to that once, and i am calling the function on elapsed event of that timer, this one i found it from http://www.aspfree.com/c/a/C-Sharp/Timer-Objects-in-Windows-Services-with-C-sharp-dot-NET/[^] here, really a good explanation and more over easy solution
Thanks all
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web01 | 2.8.1411022.1 | Last Updated 23 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100