You can use a Timer object (System.Timers), 1) OnStart Event of the service enable the time, set the time interval and handle the ElapsedEventHandler. 2) In the Elapsed event handler function call your function which deletes the folders.
Check here for more details http://www.aspfree.com/c/a/C-Sharp/Timer-Objects-in-Windows-Services-with-C-sharp-dot-NET/ On Mon, Dec 28, 2009 at 11:58 AM, VB <[email protected]> wrote: > Hi, > I have a window service and I am installing and starting it manually. > My service is deleting some folders on some defined criteria. My > service is working fine and deleting the folders but here I want to > schedule a timer and on a specific time interval service will run. How > I can do this? > > Regards, > VB >
