示例#1
0
        // to run the Daily Update Job manually
        public ActionResult DailyUpdate()
        {
            JobSchedulerController JS = new JobSchedulerController();

            if (JS.DailyUpdateAlgorithm(true))
            {
                // ran successfully
                return(RedirectToAction("Admin", "Home", new { message = "Daily Update Successfully Run!" }));
            }
            else
            {
                // failed to complete
                tbl_DailyUpdateLog log = db.tbl_DailyUpdateLog.OrderByDescending(x => x.DateTime).FirstOrDefault();
                string             msg = "Daily Update Failed! Only runs once per day! Last Run: " + log.DateTime;
                return(RedirectToAction("Admin", "Home", new { message = msg }));
            }
        }
示例#2
0
 public async Task Execute(IJobExecutionContext context)
 {
     JobSchedulerController JS = new JobSchedulerController();
     bool run = JS.DailyUpdateAlgorithm(false);
 }