Hangfire in ASP.NET Core - Handle Background Jobs Easily

  Рет қаралды 985

Code Maze

Code Maze

Күн бұрын

►► Master Web API development Best Practices: bit.ly/3TnqoFQ
►► Build great web apps in Blazor WebAssembly: bit.ly/437g87T
►► Support us on Patreon and get the source code: / codemaze
Hi everyone. My name is Marinko Spasojevic and in this video, I will show you how to execute background work easily in .NET with the Hangfire library.
Almost all applications need some background work, and there are many situations where we need to keep that work away from the spotlight.
Sometimes it’s a long-running task that slows down the application flow. An example might be uploading photos to a social media platform. We can do the upload task behind the scenes and the user can continue to browse freely.
We may also need to schedule some tasks to run every hour, week, or maybe a month like watching out for inactive users or sending subscription invoices.
We can handle all these tasks with a good background task scheduler that takes care of the details for us. This is where Hangfire shines.
FOLLOW US ON SOCIAL MEDIA!
►► / marinko-spasojevic
►► / codemazeblog
►► / codemazeblog

Пікірлер: 9
@CodeMaze
@CodeMaze 12 күн бұрын
Thank you all for watching and for your support. ►► If you want to master Web API development using best practices, check out our Web API book: bit.ly/3x75ZMM ►► Also, to build great full-stack apps with Blazor, check out our course: bit.ly/3Pw3Y33
@ventoshe
@ventoshe 11 күн бұрын
Very well explained, thanks! I've been using Hangfire for a few years now. It is reliable and very simple to use.
@CodeMaze
@CodeMaze 11 күн бұрын
Great to hear that! Yeah, it is a great library and easy to use.
@flave11
@flave11 3 күн бұрын
I love your tutroals, Simple and direct.
@CodeMaze
@CodeMaze 3 күн бұрын
Thank you, glad you like them.
@10Totti
@10Totti 11 күн бұрын
Great video but: 1) What if I want to start a task without using APIs? 2) Is it possible to programmatically clean up older jobs? 3) Is there a way to prevent jobs from overlapping if they haven't finished yet? Thanks.
@CodeMaze
@CodeMaze 11 күн бұрын
Hi Totti. 1) You are not tied only to ASP.NET Core apps. If you check their documentation, you will see they are using a regular, I would say, console app example. 2) Yes. Of course, if you think about recurring jobs. Again, I just looked at their documentation and there is an example here, it is pretty simple. 3) I believe you think if the job is scheduled for example every 5 minutes but for some reason, it takes more than 5 min to finish. Maybe there is a way, but I am not sure. Again, I think the best way would be to check their documentation about this. I looked for a bit but didn't find anything about it.
@tommylg9748
@tommylg9748 10 күн бұрын
Love this
@CodeMaze
@CodeMaze 10 күн бұрын
Thanks for watching the video. I'm glad you liked it.
The Only .NET Scheduler You Should Be Using!
16:38
Nick Chapsas
Рет қаралды 51 М.
Implementing API Gateway With Ocelot in ASP.NET Core
13:26
Code Maze
Рет қаралды 2,8 М.
Brawl Stars Edit😈📕
00:15
Kan Andrey
Рет қаралды 43 МЛН
WILL IT BURST?
00:31
Natan por Aí
Рет қаралды 47 МЛН
The Joker wanted to stand at the front, but unexpectedly was beaten up by Officer Rabbit
00:12
SCHOOLBOY. Мама флексит 🫣👩🏻
00:41
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 7 МЛН
Reacting to Controversial Opinions of Software Engineers
9:18
Fireship
Рет қаралды 2,1 МЛН
Implementing the Transactional Outbox pattern with Hangfire
14:28
Milan Jovanović
Рет қаралды 11 М.
Replit AI Agent - My First Impression | Cursor Challenger?
19:48
All About AI
Рет қаралды 16 М.
Blazor WebAssembly ASP.NET Core Hosted in .NET 8 🔥
15:37
Patrick God
Рет қаралды 20 М.
Let's Fix The Fatal Flaw in TypeScript's Union Types!
13:45
Typed Rocks
Рет қаралды 13 М.
Background Tasks Are Finally Fixed in .NET 8
10:29
Nick Chapsas
Рет қаралды 109 М.
Brawl Stars Edit😈📕
00:15
Kan Andrey
Рет қаралды 43 МЛН