How to clear succeeded jobs visible on dashboard?

dashboard
Tags: #<Tag:0x00007f49a0bc4ff8>

#1

I’m starting to use hangfire and maybe, when you read my question, you will cal me newbie but here it goes :smile:

I have a recurring job running every minute with success. On dashboard I’m getting a growing list of succeeded jobs and it seems that this list will never be cleaned.
How can I clean it and/or how can I define a maximum time for this jobs to be there?

Looking forward for na answer for some hangfire guru :smile:

Thank you in advance for any reply.
Regards


Different success JOB count on Dashboard
#2

Hello, @fmp. Succeeded jobs are being deleted automatically after 1 day (it is configurable), so you don’t need to clear the list manually.


#3

Hey @odinserj - Can you point me to the documentation for clearing successful jobs are a day?

Thanks!


#4

Hi @odinserj

Another newbie here

According to the source (/Hangfire.Core/States/ApplyStateContext.cs) the automatic deletion delay of 1 day seems to be hard coded. Can you give a hint how to configure it?

Thank you in advance for any reply.
Regards


#5

Hi Chris, please take a look at this answer – only the default value is hard-coded.


#6

Thanks a lot. Didn’t see this before.