public IActionResult MonthlyBatchJob() { try { if (DateTime.Now.Day == 14) { _log4net.Info("Monthly Checking Started"); _provider.RunMonthlyJob(); _log4net.Info("Monthly Service Charge Deduction Completed"); } return(Ok("Services charged applied to accounts")); } catch (Exception e) { _log4net.Error("Monthy Charge Couldn't be applied due to exception"); _log4net.Error(e.Message); return(StatusCode(500)); } }