using ServiceDeamon; using System.Configuration; using System.ServiceProcess; public class Program { private static Timer timer; private static int CheckInteval = Convert.ToInt32(ConfigurationManager.AppSettings["CheckInteval"]); public static void Main(string[] args) { timer = new Timer(new TimerCallback(CheckSta)); timer.Change(CheckInteval, Timeout.Infinite); Console.Read(); } private static void CheckSta(object sta) { CheckServiceHelper.CheckStatus(); timer.Change(CheckInteval, Timeout.Infinite); } }