Using Hangfire to manage the jobs in .NET

Поделиться
HTML-код
  • Опубликовано: 23 авг 2024

Комментарии • 21

  • @nataliabojarska5808
    @nataliabojarska5808 Год назад +2

    Great video! A lot of useful knowledge!

  • @mohamedal-qadeery6530
    @mohamedal-qadeery6530 Год назад

    Amazing keep up the good work !

  • @animeshmaity5562
    @animeshmaity5562 2 месяца назад

    Amazing! I am trying to deploy this type of project, but I am encountering a dependency error in IIS, such as 'does not contain a method with the signature.

    • @remigiuszzalewski
      @remigiuszzalewski  2 месяца назад

      Do you have enabled logging to check in which place actually it throw that Exception? It’s the InvalidOperationException. Does it work while running locally?

  • @DatNguyenTan-oh7rw
    @DatNguyenTan-oh7rw 10 месяцев назад

    This video helps me alot thanks

  • @user-bf8nf6eh4i
    @user-bf8nf6eh4i 4 месяца назад

    Great video, congratulation, I have one question, wht IDE are you using to coding?

  • @soft.developer
    @soft.developer 8 месяцев назад

    Bro, very useful video, thanks.
    I need to display the ScheduledAt and NextExecution fields on the frontend. However, to calculate NextExecution, I need the Cron property. How or where can I obtain it?
    In my code, I do the following:
    csharp
    var jobs = StorageConnection.ScheduledJobs(0, 100).Select(j => new { j.Value, j.Key });
    But the jobs variable does not have the Cron property.

    • @remigiuszzalewski
      @remigiuszzalewski  6 месяцев назад

      If you have set the trigger for the job then you can obtain it like:
      var scheduledTime = await scheduler.GetTrigger(new TriggerKey("myTrigger", "group1")).Result.GetPreviousFireTimeUtc();
      var nextExecutionTime = await scheduler.GetTrigger(new TriggerKey("myTrigger", "group1")).Result.GetNextFireTimeUtc();

  • @RoyZASTEROiD
    @RoyZASTEROiD Год назад

    thanks

  • @rohitverma-vo4px
    @rohitverma-vo4px 5 месяцев назад

    Why you have created separate projects for hangfire server and running it willingly? Doesn't hangfire servers run continuosuly?

    • @remigiuszzalewski
      @remigiuszzalewski  5 месяцев назад

      Hangfire server is the consumer of the requested job to be done by the producer. When you use for instance Enqueue method it will be stored in the database and later on based on the configuration the Hangfire server will process this job accordingly. This is the good approach of decoupling the producer/consumer which then could be scaled out if needed

  • @huytube6
    @huytube6 6 месяцев назад

    Why EmailService is in Producer project instead of Hangfire server?

    • @remigiuszzalewski
      @remigiuszzalewski  6 месяцев назад

      It’s related with „producing” emails and this is the only reason for that. Anyway it is registered only in Server side, so without any issues it could be situated as well in Server project 😉

  • @dfavourr
    @dfavourr 4 месяца назад

    Mine does not execute. Can you help out?

    • @remigiuszzalewski
      @remigiuszzalewski  4 месяца назад

      Of course, why exactly it did not execute? Do you have maybe an exception with stacktrace?

  • @anonim9783
    @anonim9783 Год назад

    Where is code ?