#49 Golang - Task Scheduler in Go with gocron

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

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

  • @alexzav1327
    @alexzav1327 13 дней назад

    Very helpful video! Thx )

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

    exactly what I need in my project

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

      Glad! This was helpful!

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

    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  2 месяца назад

      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 2 месяца назад

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

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

      You can use ditributed lock that works like a mutex. Please ccheck this episode: ruclips.net/video/UfmzataUVYc/видео.html

  • @chadgrant8870
    @chadgrant8870 2 месяца назад +1

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

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

      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 2 месяца назад

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

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

      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: ruclips.net/video/UfmzataUVYc/видео.html
      Please have a look.

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

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