#49 Golang - Task Scheduler in Go with gocron

Поділитися
Вставка
  • Опубліковано 31 гру 2024

КОМЕНТАРІ • 13

  • @amitkumdixit
    @amitkumdixit Місяць тому

    There is a Similar library in C# called HangFire which does similar thing only addition is it has a very good Dashboard, Retry, Job status etc..

  • @severinb1461
    @severinb1461 4 місяці тому +1

    exactly what I need in my project

    • @codeheim
      @codeheim  4 місяці тому

      Glad! This was helpful!

  • @alexzav1327
    @alexzav1327 2 місяці тому

    Very helpful video! Thx )

  • @olegivliev2765
    @olegivliev2765 4 місяці тому

    good explanation. what if someone needed to run a job manually from a web ui? for example u have a daily job, it finished with an err and a manager fixed the err manually and wanted to re-run the job.

    • @codeheim
      @codeheim  4 місяці тому

      In such a case, you would like to push the job to the job queue. If the queue is generic, you can use an interpreted language to add the job.
      Not a great way. Will try to find a better way.

  • @AminShahbaghi
    @AminShahbaghi 4 місяці тому

    How to prevent duplicate cron jobs from running when using this library?

    • @codeheim
      @codeheim  4 місяці тому

      You can use ditributed lock that works like a mutex. Please ccheck this episode: ua-cam.com/video/UfmzataUVYc/v-deo.html

  • @chadgrant8870
    @chadgrant8870 4 місяці тому +1

    why would you need a lib like this in go? so easy to write a go func to do for { select

    • @RobinVeldhuis
      @RobinVeldhuis 4 місяці тому

      So that you wont get bothered every time someone from the marketing team wants to add a plugin, which requires a job to be executed periodically, to the web platform

    • @chadgrant8870
      @chadgrant8870 4 місяці тому

      Huh? What’s this got to do with marketing???!

    • @codeheim
      @codeheim  4 місяці тому

      Not just marketing. You might want to run something in the background periodically at a specific time. I have tried to explain in this episode: ua-cam.com/video/UfmzataUVYc/v-deo.html
      Please have a look.

    • @chadgrant8870
      @chadgrant8870 4 місяці тому

      @@codeheim but thiat is so simple to do in go, like super easy. don't need a lib