# LastExecution is updated even if the recurring job is not run

**URL:** <https://discuss.hangfire.io/t/lastexecution-is-updated-even-if-the-recurring-job-is-not-run/8397>\
**Category:** bug?\
**Tags:** recurring\
**Created:** [April 20, 2021, 8:24am UTC](https://discuss.hangfire.io/t/lastexecution-is-updated-even-if-the-recurring-job-is-not-run/8397 "2021-04-20T08:24:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexandis](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/alexandis/32/2354_2.png) [@alexandis](https://discuss.hangfire.io/u/alexandis)\
**Post date:** [April 20, 2021, 8:24am UTC](https://discuss.hangfire.io/t/lastexecution-is-updated-even-if-the-recurring-job-is-not-run/8397/1 "2021-04-20T08:24:11Z")

</div>

I use a “pause” mechanism for recurring job via adding my tag into **HF\_SET** table and checking its presence in `OnPerforming` event of a _job attribute_: if present - `filterContext.Canceled = true`. Whereas the execution process is correct for this approach, I’ve noticed `LastExecution` field for the paused job is set as if it was actually run. Is it a bug?

---

<div class="post-metadata">

**Author:** ![odinserj](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/odinserj/32/648_2.png) [@odinserj](https://discuss.hangfire.io/u/odinserj)\
**Post date:** [April 20, 2021, 10:04am UTC](https://discuss.hangfire.io/t/lastexecution-is-updated-even-if-the-recurring-job-is-not-run/8397/2 "2021-04-20T10:04:02Z")

</div>

Recurring jobs don’t track the status of emitted background jobs, and `LastExecution` column is updated when it’s created (before `filterContext.Canceled` property is being set). However in Hangfire.Core 1.8.0 (beta is already available) such a canceled job will be moved to the Deleted state instead of the Succeeded one, so you’ll be able to see that it was canceled.
