Exemple #1
0
        private static void WorkManager()
        {
            Console.WriteLine("WorkManager thread Started");

            AdvancedScheduler ads = new AdvancedScheduler();

            DataSet pending = ads.GetPendingJobs();

            foreach ( DataRow job in pending.Tables[0].Rows )
            {
                Console.WriteLine("{0}", job.ToString());
            }

            Console.WriteLine("WorkManager thread Exiting");
        }
Exemple #2
0
        private static void ShowRunRecord(string reqjob)
        {
            AdvancedScheduler ads = new AdvancedScheduler();
            DataSet jobs = ads.GetJobStatus(reqjob);

            string format    = "{0,-35}  {1,-25}  {2,-25}  {3,-6}";
            string hdrformat = format;

            Console.WriteLine(hdrformat, "Job Name", "Last Start", "Last End", "Status");
            Console.WriteLine(format, "".PadRight(35,'-'), "".PadRight(25,'-'), "".PadRight(25,'-'), "".PadRight(6,'-'));

            foreach (DataRow JobRecord in jobs.Tables[0].Rows)
            {
                Console.WriteLine(format, JobRecord[0], JobRecord[1], JobRecord[2], JobRecord[3] );
            }
        }