Hangfire .NET Core - Get enqueued jobs list

RisingHerc picture RisingHerc · Aug 10, 2018 · Viewed 10.2k times · Source

Is there a method in the Hangfire API to get an enqueued job (probably by a Job id or something)?

I have done some research on this, but I could not find anything.

Please help me.

Answer

RisingHerc picture RisingHerc · Aug 10, 2018

I have found the answer in the official forum of Hangfire.

Here is the link: https://discuss.hangfire.io/t/checking-for-a-job-state/57/4

According to an official developer of Hangfire, JobStorage.Current.GetMonitoringApi() gives you all the details regarding Jobs, Queues and the configured servers too!

It seems that this same API is being used by the Hangfire Dashboard.

:-)