Quartz with Spring Boot using Docker and PostgreSQL

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

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

  • @adeleyejeremiah4059
    @adeleyejeremiah4059 Год назад +1

    great work but a. bit vconfused, how do I execute a task with this implementation. e.g want to execute an email job with this implementation. is this possible? if yes how?

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

      Yes, you would put code in your action that is being triggered by Quartz to send an email.
      github.com/The-Tech-Tutor/quartz/blob/master/src/main/java/com/spring/quartz/action/Action.java
      You could use something like SendGrid.

  • @niteshgupta212
    @niteshgupta212 7 месяцев назад

    i am trying to do a delay trigger based on certain logic but job and triggers are not going to my postgres DB. Also, if server gets re-deployed, triggers are getting lost. How can this be fixed?? LEtme know if any specific details you need for debugging. Thanks.

  • @matt19661
    @matt19661 2 года назад +1

    Really helpful video, thanks! How much harder would it be to run this within a K8 cluster? I would like to demo quartz in clustered Springboot environment sharing a PostgreSQL instance. Would make a great sequel to this vid!

  • @Spelter
    @Spelter 11 месяцев назад

    I was searching for something like this, of course, I have to check how it would work in a K8s cluster so the Scheduler is not starting the Job on 2 servers.
    When I understand the code right, you have to implement a job (like your Action), of course there are possibilities to make generic jobs, but putting new jobs classes in, that would be hard because you would have to deploy it, there is no plugin managment possible. A small price to pay though.

    • @TechTutorRyan
      @TechTutorRyan  11 месяцев назад

      Quartz supports Cluster configurations for multiple instances.
      www.quartz-scheduler.org/documentation/quartz-1.8.6/configuration/ConfigJDBCJobStoreClustering.html

  • @MomsDailyCorner
    @MomsDailyCorner 2 года назад

    do we need seperate scripts for postgresql , MySQL etc for quartz scheduler...for example , Is it possible for table quartz_job_detail having column is-durable in MySQL and postgresql having datatype is varchar(1). Or is it mandatory that postgresql is_durable column in quartzjob detail should be Boolean?

    • @TechTutorRyan
      @TechTutorRyan  2 года назад +1

      When it comes to running scripts to initialize the tables for Quartz, I would suggest referring to the files available in their Github repo:
      github.com/quartz-scheduler/quartz/tree/master/quartz-core/src/main/resources/org/quartz/impl/jdbcjobstore

    • @MomsDailyCorner
      @MomsDailyCorner 2 года назад

      @@TechTutorRyan thanks

    • @matt19661
      @matt19661 2 года назад +1

      @@TechTutorRyan Fixed my " ERROR: operator does not exist: character varying = boolean" issue. Thanks!

  • @dolphinmoto3226
    @dolphinmoto3226 3 года назад

    Thanks for the video! Why do we want to use posgres in docker?

    • @TechTutorRyan
      @TechTutorRyan  3 года назад +1

      You do not have to use Docker. I was using docker, because it makes things much easier to setup and test locally. If you have any remote databases you can reference those in the configuration and it will still work.

  • @leahdorinbentovim3632
    @leahdorinbentovim3632 3 года назад

    Where do you get the AutoWiringSpringBeanJobFactory? I can't import it.

    • @TechTutorRyan
      @TechTutorRyan  3 года назад

      It is in my source code which was linked in the description. We have to create it.
      github.com/The-Tech-Tutor/quartz/blob/master/src/main/java/com/spring/quartz/factory/AutoWiringSpringBeanJobFactory.java

  • @323dawn
    @323dawn 3 года назад

    can I pull quartz image ? I am doing POC on quartz for my project

    • @323dawn
      @323dawn 3 года назад

      any quartz image you know, i am new to docker

    • @TechTutorRyan
      @TechTutorRyan  3 года назад +1

      @@323dawn You can use the docker-compose.yml file in the project to spin up a PostgreSQL database. Then when you run the project the flyway dependency in the pom file will help setup the database with the tables it needs for Quartz. Additionally the pom file has a dependency for Quartz that helps give you classes to help you use Quartz.
      The source code is in the description as well as other videos that may be helpful.
      Here is the source code link again for convenience:
      github.com/The-Tech-Tutor/quartz

    • @323dawn
      @323dawn 3 года назад

      @@TechTutorRyan I am trying to find quartz image which supports Rest API.
      I'm new to docker, I not sure which Image to choose. Some having description some not. Most of them doesn't run.
      Is it okay if I create a Spring Boot project for Quartz and upload on Docker Hub to check Rest calls ?

    • @TechTutorRyan
      @TechTutorRyan  3 года назад

      I am a bit confused what you mean by a Quartz image with a Rest API. In my video I am using a PostgreSQL image for the Quartz database tables that are needed. As for APIs, I have already created some APIs that make things easy and it is already available in my source code which I linked in the description.
      Here it is again for convenience:
      github.com/The-Tech-Tutor/quartz

  • @bobbiramirez3367
    @bobbiramirez3367 3 года назад

    Thanks Tech Tutor!