I have installed the packages:
Hangfire.AspNetCore
Hangfire.MemoryStorage.Core
Here is my code:
using Hangfire;
using Hangfire.MemoryStorage;
public void ConfigureServices(IServiceCollection services)
{
services.AddHangfire(c => c.UseStorage(GlobalConfiguration.Configuration.UseMemoryStorage()));
services.AddMvc();
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
app.UseHangfireServer();
}
...
public static void Main(string[] args)
{
RecurringJob.AddOrUpdate(() => Console.Write("Easy!"), Cron.Minutely);
}
However, I am getting the error:
JobStorage.Current property value has not been initialized. You must set it before using Hangfire Client or Server API.
My application is running on ASP.NET Core
.