# How often are successful jobs physically deleted in the storage?

**URL:** <https://discuss.hangfire.io/t/how-often-are-successful-jobs-physically-deleted-in-the-storage/1735>\
**Category:** question\
**Tags:** sql-server\
**Created:** [January 27, 2016, 4:32pm UTC](https://discuss.hangfire.io/t/how-often-are-successful-jobs-physically-deleted-in-the-storage/1735 "2016-01-27T16:32:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dotnetchris](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/dotnetchris/32/527_2.png) [@dotnetchris](https://discuss.hangfire.io/u/dotnetchris)\
**Post date:** [January 27, 2016, 4:32pm UTC](https://discuss.hangfire.io/t/how-often-are-successful-jobs-physically-deleted-in-the-storage/1735/1 "2016-01-27T16:32:09Z")

</div>

I know the retention time is configurable, my question is about the physical deletion.

If retention is set to 1 day for successful jobs. How many times does hangfire attempt to delete expired successful jobs, once a day, once an hour, continuously?

The organization i’m at has a scheduled maintenance job that rebuilds indexes when fragmentation occurs and they’re apparently fighting each other. So i’m trying to figure out is it a scheduling issue between the two or does hangfire just not stop deleting successful jobs that this automated maintenance job isn’t viable with hangfire’s database.

---

<div class="post-metadata">

**Author:** ![burningice](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/burningice/32/53_2.png) [@burningice](https://discuss.hangfire.io/u/burningice)\
**Post date:** [January 28, 2016, 3:51pm UTC](https://discuss.hangfire.io/t/how-often-are-successful-jobs-physically-deleted-in-the-storage/1735/2 "2016-01-28T15:51:48Z")

</div>

It depends on what Storage implementation you’re using, but for the native Sql Storage, the default internval for checking if records are expired and should be deleted, is 1 hour

> <https://github.com/HangfireIO/Hangfire/blob/ad008233257cf2ff574ffc737b6203bc41b97cc5/src/Hangfire.SqlServer/SqlServerStorageOptions.cs#L32>

---

<div class="post-metadata">

**Author:** ![dotnetchris](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/dotnetchris/32/527_2.png) [@dotnetchris](https://discuss.hangfire.io/u/dotnetchris)\
**Post date:** [January 28, 2016, 4:28pm UTC](https://discuss.hangfire.io/t/how-often-are-successful-jobs-physically-deleted-in-the-storage/1735/3 "2016-01-28T16:28:15Z")

</div>

Thanks! this is exactly what i was looking for.

---

<div class="post-metadata">

**Author:** ![jayasurya\_j](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/jayasurya_j/32/2044_2.png) [@jayasurya\_j](https://discuss.hangfire.io/u/jayasurya_j)\
**Post date:** [April 16, 2020, 6:15pm UTC](https://discuss.hangfire.io/t/how-often-are-successful-jobs-physically-deleted-in-the-storage/1735/4 "2020-04-16T18:15:01Z")

</div>

what about postgresql, i don’t find any option
