Beispiel #1
0
        public ActionResult Index()
        {
            SchedulerStatusViewModel Model = new SchedulerStatusViewModel();

            try
            {
                ViewBag.Title = "[[[Tasks]]]";
                //  ScheduledTaskService.ScheduleEMailUserTask(21, CommonsConst.EmailType.UserWelcome, TimeSpan.FromSeconds(200));
                //   ScheduledTaskService.ScheduleEMailUserTask(21, CommonsConst.EmailType.UserWelcome, TimeSpan.FromSeconds(300));

                Model = TaskHelper.GetSchedulerInformation();
                Model.ScheduledTasksNumberInDatabase = _scheduledTaskService.GetActiveScheduledTasksNumber();
                Model.ScheduledTasksProblemsNumber   = _scheduledTaskService.GetNotExecutedTasksNumber();
            }
            catch (Exception e)
            {
                Commons.Logger.GenerateError(e, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
            }

            return(View(Model));
        }