Coding Shorts: Running Async Jobs in ASP.NET Core

  Рет қаралды 3,756

Shawn Wildermuth

Shawn Wildermuth

Күн бұрын

I recently needed to run long task in the background in ASP.NET Core. For our particular need, we couldn't do this in a distributed fashion (e.g. fire up a bus and a project to monitor the bus and accomplish the task). Instead, I found a great library for firing asynchronous jobs off. Let me show you how it works!
00:00 Introduction
01:08 Getting Started
02:10 Introducing Quartz.ASPNETCore
02:33 Configurating Quartz
03:38 Your First Job
04:55 Scheduling a Job
07:14 Using State
08:25 Wrapping Up
Project Repo:
github.com/shawnwildermuth/co...
If you like this video, you might like other videos in my Instructional Videos:
- • Instructional Videos

Пікірлер: 21
@sh00termacg
@sh00termacg 26 күн бұрын
Awesome thanks a lot Shawn! Love how concise you are.
@heavypeki
@heavypeki Ай бұрын
Like as always, concise and straight to the point. You are amazing Shawn. Keep it up.
@adamoneil7435
@adamoneil7435 Ай бұрын
really cool! I knew Quartz was a thing, but had never seen a demo until now. Love it!
@swildermuth
@swildermuth Ай бұрын
Nice.
@PankajNikam
@PankajNikam Ай бұрын
Thanks for this video :)
@swildermuth
@swildermuth Ай бұрын
My pleasure!
@palpie
@palpie Ай бұрын
It was just a small part of this, but you should use ILogger as it is meant to, without string interpolation.
@swildermuth
@swildermuth Ай бұрын
So we should avoid $""? Why?
@davood7497
@davood7497 Ай бұрын
Coolio !!! 💯💯💯💯💯
@Radddan
@Radddan Ай бұрын
Hey Shawn, can you make a general c# video on streams?
@alfonsdeda8912
@alfonsdeda8912 Ай бұрын
Hi, great video! What are the advantages over hangfire?
@swildermuth
@swildermuth Ай бұрын
Hangfile requires data storage - there is no non-durable jobs. That's all.
@nirajchandrajoshi
@nirajchandrajoshi Ай бұрын
Great video I have one query - can I run a stored proc on crown schedule where that sproc took 20 minutes to complete. And What happen if IIS pool recycles in between while this job is running do I need to reschedule or quartz will take care of this. Please reply.
@swildermuth
@swildermuth Ай бұрын
Look at quartz's durable jobs. Though in the case of a store proc, I might kick it off, not hold a connection the entire time.
@nirajchandrajoshi
@nirajchandrajoshi Ай бұрын
@@swildermuth Thank you very much
@PelFox
@PelFox Ай бұрын
How does it keep state if your app crashes / restarts? Can you store the jobs in a queue or database?
@swildermuth
@swildermuth Ай бұрын
You can configure it to store in state (look for Durable and StoreDurably)
@juanfernandofernandez2730
@juanfernandofernandez2730 Ай бұрын
First comment
@swildermuth
@swildermuth Ай бұрын
Second!
Coding Shorts: Ahead-of-Time Compilation in C# (AOT)
12:03
Shawn Wildermuth
Рет қаралды 1,6 М.
Coding Shorts: .NET Aspire - Databases
10:52
Shawn Wildermuth
Рет қаралды 3 М.
NERF WAR HEAVY: Drone Battle!
00:30
MacDannyGun
Рет қаралды 43 МЛН
The day of the sea 🌊 🤣❤️ #demariki
00:22
Demariki
Рет қаралды 100 МЛН
ОДИН ДЕНЬ ИЗ ДЕТСТВА❤️ #shorts
00:59
BATEK_OFFICIAL
Рет қаралды 8 МЛН
Remove Deep Nesting | Clean Code
0:54
Zoran Horvat
Рет қаралды 3,8 М.
Coding Shorts: 100 & More
0:48
Shawn Wildermuth
Рет қаралды 664
Scheduling Background Tasks In .NET With Quartz
10:51
Milan Jovanović
Рет қаралды 33 М.
Creating .Net Core Microservices using Clean Architecture
26:02
Rahul Sahay
Рет қаралды 17 М.
How I Learned The Cloud and Got a Job as a Cloud Engineer (3 Months)
13:07
Tech With Soleyman
Рет қаралды 365 М.
Coding Shorts #102: Using SQL Server Containers for Dev
11:00
Shawn Wildermuth
Рет қаралды 2 М.
Coding Shorts: Methods, Funcs & Actions...Oh, My!
11:02
Shawn Wildermuth
Рет қаралды 2,2 М.
Don't throw exceptions in C#. Do this instead
18:13
Nick Chapsas
Рет қаралды 251 М.
Background Jobs in ASP.NET Core
18:35
IAmTimCorey
Рет қаралды 46 М.
Blue Mobile 📲 Best For Long Audio Call 📞 💙
0:41
Tech Official
Рет қаралды 1 МЛН