---
title: "Discussion on \"Background Tasks Made Easy with Hangfire and ASP.NET Core\" | Hashnode"
description: "Discussion on \"Background Tasks Made Easy with Hangfire and ASP.NET Core\". Hangfire is a .NET library that makes it really easy to adding background tasks to your .NET app. It supports one-off \"fire and forget\" tasks, as well as scheduling recurring tasks. On top of that it supports persistence, so all of your tasks will co..."
url: "https://hashnode.com/posts/background-tasks-made-easy-with-hangfire-and-aspnet-core/5f8aaa00d7dc0b17a97a2b41"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Background Tasks Made Easy with Hangfire and ASP.NET Core](https://samwalpole.com/background-tasks-made-easy-with-hangfire-and-aspnet-core?utm_source=hashnode&utm_medium=feed)

Hangfire is a .NET library that makes it really easy to adding background tasks to your .NET app. It supports one-off "fire and forget" tasks, as well as scheduling recurring tasks. On top of that it supports persistence, so all of your tasks will co...

Oct 17, 2020 · 6 min read · samwalpole.com  
Updated Aug 25, 2024  
Read the article

-   [#dotnet](https://hashnode.com/tag/dotnet)
-   [#aspnet-core](https://hashnode.com/tag/aspnet-core)
-   [#dotnetcore](https://hashnode.com/tag/dotnetcore)
-   [#tutorial](https://hashnode.com/tag/tutorial)
-   [#csharp](https://hashnode.com/tag/csharp)

## Written by

[Sam Walpole](https://hashnode.com/@dr_sam_walpole)

@dr\_sam\_walpole · United Kingdom

  
[View profile](https://hashnode.com/@dr_sam_walpole)

👨‍💻 Fullstack .NET and JavaScript teacher and advocate 👨‍💻

## Responses 2

Markdown supported · ⌘↵ to post

[Thiago Loureiro](https://hashnode.com/@thiagoguaru)

[Feb 7, 2021](https://hashnode.com/posts/background-tasks-made-easy-with-hangfire-and-aspnet-core/5f8aaa00d7dc0b17a97a2b41/comment/601fd9b7636acc2a3822f800)

Hi! nice article! Just one note, there's a "typo" in your code

Should be **UseMemoryStorage**, correct?

```
services.AddHangfire(c => c.UserMemoryStorage());
```

[Sam Walpole](https://hashnode.com/@dr_sam_walpole)

[Feb 7, 2021](https://hashnode.com/posts/background-tasks-made-easy-with-hangfire-and-aspnet-core/5f8aaa00d7dc0b17a97a2b41/comment/601fd9b7636acc2a3822f800#reply-601ffaa6636acc2a3822fbe8)

Ah yes, thanks for letting me know. I'll update it now :)

[Pavel Biryukov](https://hashnode.com/@Freerider77)

[Oct 18, 2020](https://hashnode.com/posts/background-tasks-made-easy-with-hangfire-and-aspnet-core/5f8aaa00d7dc0b17a97a2b41/comment/5f8caaae83db9130bf5bc6b2)

Nice library! Can I schedule a task to run one time after 15 minutes? Run reccuring and then cancel it after first run?

[Sam Walpole](https://hashnode.com/@dr_sam_walpole)

[Oct 18, 2020](https://hashnode.com/posts/background-tasks-made-easy-with-hangfire-and-aspnet-core/5f8aaa00d7dc0b17a97a2b41/comment/5f8caaae83db9130bf5bc6b2#reply-5f8cae1983db9130bf5bc6c8)

Hey, If you want to run once after a delay, there is a method for that. I haven't tried it myself, but this documentation might be useful for you :)

[docs.hangfire.io/en/latest/background-methods/cal…](https://docs.hangfire.io/en/latest/background-methods/calling-methods-with-delay.html)
