AllReady.Controllers.TestHangfireController.Index C# (CSharp) Метод

Index() публичный Метод

public Index ( ) : IActionResult
Результат IActionResult
        public IActionResult Index()
        {
            //BackgroundJob.Enqueue(() => Debug.WriteLine("Background Job completed successfully!"));

            //backgroundJob.Enqueue(() => Debug.WriteLine("Background Job completed successfully!"));
            //Debug.WriteLine("Background job has been created.");

            backgroundJob.Schedule(() => Debug.WriteLine("Scheduled Job completed successfully!"), TimeSpan.FromSeconds(5));
            Debug.WriteLine("Scheduled job has been created.");

            return RedirectToAction("Index", "Home");
        }
    }
TestHangfireController