How can i delete failed jobs with more than 1 day?
the code i made in VB Net is .
Idx = 0
For Each Job In HangFireMonitor.FailedJobs(0, CInt(HangFireMonitor.FailedCount()))
Idx = Idx + 1
Console.WriteLine("Idx:" & Idx.ToString & "-Failed Job ID: " & Job.Key)
Now i want to delete all the jobs that failed with more than 1 day.
I have tried to find it but with no sucess.
failed with more than 1 day
You mean failed more than one day ago?
Why are you even letting the failed jobs go into the failed bucket at all? You can set failed jobs to be deleted after failing reties.
[AutomaticRetry(Attempts = 5, OnAttemptsExceeded = AttemptsExceededAction.Delete)]
public void BackgroundMethod()