I have two action method DayStart() and DayEnd() and I have to call DayStart()
at 8:05 am (Mon-Fri) and DayEnd() at 8:04 am (Mon-Fri) and for this the best option so far in Quartz.net but i don't know how do i call these two action method in jobExecution method is there any way to achieve this?
public ActionResult StartDay() { int userid = Auth.UserID; daysServices.StartDay(userid); return RedirectToAction("Index", "Home", new { isdayClose = false }); } public ActionResult CloseDay() { int userid = Auth.UserID; int dayId = daysServices.getActiveDay(); int shiftId = daysServices.getActiveShift(); daysServices.CLoseDay(dayId, userid, shiftId); return RedirectToAction("TokenDayAmount", "Home", new { isdayClose = true }); } public async Task Execute(IJobExecutionContext context) { await Console.Out.WriteLineAsync("HelloJob is executing."); //i hope something like this? DayStart(); }
Or is there any other way to solve this kindly let me know