Background Jobs With Quartz - Advanced Scheduling, Persistence, OpenTelemetry

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ม.ค. 2025

ความคิดเห็น • 42

  • @MilanJovanovicTech
    @MilanJovanovicTech  วันที่ผ่านมา +2

    Want to master Clean Architecture? Go here: bit.ly/3PupkOJ
    Want to unlock Modular Monoliths? Go here: bit.ly/3SXlzSt
    Get the source code here: www.patreon.com/milanjovanovic

  • @developmentroselino
    @developmentroselino วันที่ผ่านมา +2

    your upload time is perfectly inline with my dinner time, i can eat while watch your video. thank you for quartz topic

  • @antonmartyniuk
    @antonmartyniuk 7 ชั่วโมงที่ผ่านมา +1

    Note: there is a Nuget package for EF Core persistence, so you can add corresponding Quartz entity registration in your DbContext OnConfiguring method.
    After you just regularly create migrations and update your database exeucting migrations or exporting them to a single SQL file

    • @MilanJovanovicTech
      @MilanJovanovicTech  5 ชั่วโมงที่ผ่านมา +1

      Huh. Is that a community contribution?

  • @juswa639
    @juswa639 7 ชั่วโมงที่ผ่านมา

    Hi Milan, thanks for this!
    How are you able to see the values of the variables while in debug mode? Like in 14:23

  • @MagicLevel-c7v
    @MagicLevel-c7v ชั่วโมงที่ผ่านมา

    Great video, but in production scenarios, don't most applications use some sort of event/bus (i.e service bus) to handle all scenarios where you need to send emails/textmessages etc?

  • @mustafizurrahman4828
    @mustafizurrahman4828 วันที่ผ่านมา +1

    Hi Milan, great video! Could you please create a tutorial that integrates Quartz with a Clean Architecture approach? I believe Quartz would fit well as part of the Infrastructure layer. Additionally, it would be helpful if you could demonstrate using a separate application to process the jobs, instead of having the job processing within the same API project. Thank you!

    • @MilanJovanovicTech
      @MilanJovanovicTech  วันที่ผ่านมา

      Assuming they connect to the same database, that will work without too many isues

    • @mustafizurrahman4828
      @mustafizurrahman4828 วันที่ผ่านมา

      @@MilanJovanovicTech Yes, we can consider using the same database.

  • @10Totti
    @10Totti 21 ชั่วโมงที่ผ่านมา

    Great Tutorial!

  • @francopioletti7043
    @francopioletti7043 วันที่ผ่านมา +1

    Hi Milan. how do you handle having more than one pod or instance of the same aplication running in parallel, if I use a sql database as an store, will it prevent job duplication?

    • @MilanJovanovicTech
      @MilanJovanovicTech  5 ชั่วโมงที่ผ่านมา

      There is the [DisallowConcurrentExecution] attribute

  • @CLeovison
    @CLeovison 22 ชั่วโมงที่ผ่านมา

    Hi Milan,
    I hope that you create a video about analyzer in the future

    • @MilanJovanovicTech
      @MilanJovanovicTech  5 ชั่วโมงที่ผ่านมา

      Which analyzer?

    • @CLeovison
      @CLeovison 5 ชั่วโมงที่ผ่านมา

      @MilanJovanovicTech Hi Milan,
      Static analyzer, i watch your minimal api endpoint registration implementation and at the end of the video, you tell that one thing that can be improved in the last minute of the video is to put an analyzer. I try to read the documentation about it on microsoft website but i'm struggling to understand it so, i hope that you create a video about it in the future.
      Thank you so much ♥️

  • @math1a5
    @math1a5 17 ชั่วโมงที่ผ่านมา

    I think Quartz can even populate the values from JobDataMap to Job's properties automatically. It may be only for the basic types, however, I don't really remember...

    • @MilanJovanovicTech
      @MilanJovanovicTech  5 ชั่วโมงที่ผ่านมา

      If you find anything on that, do share

  • @maucodev
    @maucodev 13 ชั่วโมงที่ผ่านมา

    Please tell us that your next REST API course will include an audio track in Spanish

  • @thecodeman_
    @thecodeman_ วันที่ผ่านมา

    Hi man, an awesome video! Did you try to do the same thing with Hangfire? I know your preferred library is Quartz, why is that the case?

    • @MilanJovanovicTech
      @MilanJovanovicTech  วันที่ผ่านมา +1

      I prefer the Quartz support for recurring jobs and CRON schedules. Most people go for Hangfire because it has a UI, without really exploring the alternatives.

    • @kwibuske
      @kwibuske 19 ชั่วโมงที่ผ่านมา

      Any particular reason for the preference towards Quartz? Both seem to be able to handle those scenario's well?

  • @DavidSmith-ef4eh
    @DavidSmith-ef4eh 16 ชั่วโมงที่ผ่านมา

    would it be possible to just spawn another thread and run it in another thread in c#? also, what would be the downsides of this?

    • @DavidSmith-ef4eh
      @DavidSmith-ef4eh 16 ชั่วโมงที่ผ่านมา

      besides the obvious, a job that failed and can't be repeated :D

    • @MilanJovanovicTech
      @MilanJovanovicTech  5 ชั่วโมงที่ผ่านมา

      Yes. Now spawn a thread that will run every 3 hours, or any arbitrary schedule you can think of. Not very practical.

    • @DavidSmith-ef4eh
      @DavidSmith-ef4eh 5 ชั่วโมงที่ผ่านมา

      @ the most common case is to speed up the response to the user though and you don't actually care about delaying it or scheduling it.

  • @alexnilev7779
    @alexnilev7779 วันที่ผ่านมา

    Strange behavior with the database storage. If I have a task that runs every 3 hours, the task executes successfully, the service crashes, and upon restart, it starts NOT from the last successful execution from lookup db but from now. As a result, instead of the 3-hour interval, the task runs as many times as the application crashes, breaking the "once every 3 hours" condition.

    • @MilanJovanovicTech
      @MilanJovanovicTech  5 ชั่วโมงที่ผ่านมา

      That should not be the case. Are you sure the initial run completes and you have it all properly configured?

  • @CharlesOllavo
    @CharlesOllavo 20 ชั่วโมงที่ผ่านมา

    Has Quartz any UI?

  • @sunzhang-d9v
    @sunzhang-d9v 8 ชั่วโมงที่ผ่านมา

    Could you please send me a copy of this code? Due to national reasons, it seems I don't have payment permissions. I beg you.

  • @siya.abc123
    @siya.abc123 20 ชั่วโมงที่ผ่านมา +1

    Lol I saw this video as I'm working on background jobs for a side project 😅

  • @dotnetMasterCSharp
    @dotnetMasterCSharp วันที่ผ่านมา

    Hello Milan!
    I'm a software developer and I'm having trouble finding a job. Can you give me a task?
    I would like to test my knowledge accordingly!
    What do you think?

  • @duznt-xizt
    @duznt-xizt 21 ชั่วโมงที่ผ่านมา

    Quartz doesn't look developer friendly. Feel like theres too many moving pieces.

    • @MilanJovanovicTech
      @MilanJovanovicTech  5 ชั่วโมงที่ผ่านมา

      Gives you more control, not a bad thing