I just discovered that with HangFire you can have background jobs running in your .Net application but when I was testing its functionalities, I realized that the time in the method I added to a 1 minute RecurringJob does not change even though the method was triggered multiple times:
Method:
private static string GetTime()
{
return DateTime.Now.ToLongTimeString();
}
RecurringJob statement:
RecurringJob.AddOrUpdate("time", () => Console.WriteLine("Hello Hangfire! " + GetTime()), "*/1 * * * *");
My question:
Is it possible to display time updates as RecurringJob calls the method above?