HangfireIO / Hangfire

An easy way to perform background job processing in .NET and .NET Core applications. No Windows Service or separate process required
https://www.hangfire.io
Other
9.43k stars 1.71k forks source link

Hangfire recurring job is not scheduling & firing and Last and next execution time is N/A #2417

Open ramlakhan78 opened 5 months ago

ramlakhan78 commented 5 months ago

Hi there :)

I am glad to meet all of you . Actually i am facing a issue with hangfire recuring job , i have created a recuring job but it is not firing and it's last and next execution time is N/A as you can see in this snapshot :)

image

My project's hangfire configuration is :

services.AddHangfire(x => x.UseSqlServerStorage(Configuration.GetConnectionString("MSSQL")));

app.UseHangfireDashboard("/hangfire", new DashboardOptions { Authorization = new List { new MyAuthorizationFilter() } }); app.UseHangfireServer();

and this is my job code :

RecurringJob.AddOrUpdate("change-fighters-fighter-class", () => auto.UpdateFightClassForUser(), Cron.Hourly); RecurringJob.AddOrUpdate(() => auto.SendInvoiceToUser(), Cron.Hourly);

Could you please advise, how to avoid this kind of issues?

Thanks in advance