# Cleanup Failed Batch Jobs

**URL:** <https://discuss.hangfire.io/t/cleanup-failed-batch-jobs/9966>\
**Category:** question\
**Created:** [May 19, 2023, 10:29pm UTC](https://discuss.hangfire.io/t/cleanup-failed-batch-jobs/9966 "2023-05-19T22:29:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Evans](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/mark_evans/32/676_2.png) [@Mark\_Evans](https://discuss.hangfire.io/u/Mark_Evans)\
**Post date:** [May 19, 2023, 10:29pm UTC](https://discuss.hangfire.io/t/cleanup-failed-batch-jobs/9966/1 "2023-05-19T22:29:22Z")

</div>

We have a few hundred batch jobs that have not completed because 1 task in each batch failed. How do we clean this up?

Manually clicking in and deleting each job that failed is not gonna be fun.

---

<div class="post-metadata">

**Author:** ![Mark\_Evans](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/mark_evans/32/676_2.png) [@Mark\_Evans](https://discuss.hangfire.io/u/Mark_Evans)\
**Post date:** [July 19, 2023, 8:36pm UTC](https://discuss.hangfire.io/t/cleanup-failed-batch-jobs/9966/2 "2023-07-19T20:36:42Z")

</div>

@odinserj is there some way to easily clear all the failed batch jobs?

---

<div class="post-metadata">

**Author:** ![Mark\_Evans](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/mark_evans/32/676_2.png) [@Mark\_Evans](https://discuss.hangfire.io/u/Mark_Evans)\
**Post date:** [August 22, 2023, 6:01pm UTC](https://discuss.hangfire.io/t/cleanup-failed-batch-jobs/9966/3 "2023-08-22T18:01:32Z")

</div>

How do i clear failed jobs, or scheduled jobs?

@odinserj can you just point me to any sort of documentation that indicate the API that can help me with this?

---

<div class="post-metadata">

**Author:** ![Mark\_Evans](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/mark_evans/32/676_2.png) [@Mark\_Evans](https://discuss.hangfire.io/u/Mark_Evans)\
**Post date:** [September 8, 2023, 9:45pm UTC](https://discuss.hangfire.io/t/cleanup-failed-batch-jobs/9966/4 "2023-09-08T21:45:38Z")

</div>

@odinserj Any reply would be helpful? Is there someone else to be asking for help? Your docs do not discuss this so not sure how to figure this out.

We are using Redis btw.
