Need to get a failed jobs from hangfire database. ? is anyone having a idea about it?

sqlite
Tags: #<Tag:0x00007f499e014a70>

#1

Hi,
I am using hangfire in sqlite for my project . i need to get all failed jobs . is there anyway to get it.?
it ll be a great help for me to proceed .
Thanks in advance.


#2

You should be able to get everything using the JobStorage MonitoringAPI:

var monitor = Hangfire.JobStorage.Current.GetMonitoringApi();
var failedJobs = monitor.FailedJobs(0, Int32.MaxValue);