Exemplo n.º 1
0
        static void Main(string[] args)
        {
            FiveMinutesJob fiveMinutesJob = new FiveMinutesJob();
            HourlyJob      hourlyJob      = new HourlyJob();
            DailyJob       dailyJob       = new DailyJob();
            MonthlyJob     monthlyJob     = new MonthlyJob();
            AnnualJob      annualJob      = new AnnualJob();

            try
            {
                Console.WriteLine("Starting Historian database service...");
                Console.WriteLine("************************************************************************Starting service");
                HistorianDBService historianDB = new HistorianDBService();

                historianDB.Start();

                string message = "\nPress <Enter> to stop the service.";
                Console.WriteLine(message);
                Console.ReadKey();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Console.WriteLine("Historian database failed.");
                Console.WriteLine(ex.StackTrace);
                Console.ReadLine();
            }
        }
Exemplo n.º 2
0
 public void Setup()
 {
     job            = new MonthlyJob(() => { });
     SystemTime.Now = () => new DateTime(2011, 1, 1);
 }