I need to write a C# 2010 windows service that calls a console application at different times. Since I have not written a windows service before, can you tell me the following:
1. How do you setup a windows service initally? Is it a windows service a desktop application, console application, or what kind of an application is it?
2. How to you include a timer in the application so it executes at specified time periods?
Can you tell me and/or point me to references that will answer these questions listed above for me
Loading

Sukesh MarlaRank #461 · 5.4K reputationPosted Sep 4, 2012, 7:02 PM EDT
Just CReate Timer inside OnStart..
using System.Timers; Timer timer1= new Timer();timer1.Elapsed += new ElapsedEventHandler(timer1_Elapsed); timer1.Interval = 5000; timer1.Enabled = true; timer1.Start();private void timer1_Elapsed(object sender, EventArgs e) { //Some awesome code! }Chcek this is correct answer if it helped.
Sukesh MarlaRank #461 · 5.4K reputationPosted Sep 4, 2012, 7:55 AM EDT
http://www.csharp-examples.net/create-windows-service/
http://www.dotnetfunda.com/articles/article1095-creating-a-windows-service-using-csharp.aspx
Dont hesitate to ask
Check this is correct answer if it helped
scampercat187 reputationPosted Sep 4, 2012, 2:21 PM EDT
Both links show how to setup the intitial code and also how to deploy the windows service.
Do I need to select both options when I am writing the code intitally?
i would think that I write the code first and then setup deployment projects when the application is finished.
Would this be correct?