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?
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.
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.
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!
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.
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?
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
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.
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 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
@@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 ?
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
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?
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.
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.
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!
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.
Quartz supports Cluster configurations for multiple instances.
www.quartz-scheduler.org/documentation/quartz-1.8.6/configuration/ConfigJDBCJobStoreClustering.html
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?
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
@@TechTutorRyan thanks
@@TechTutorRyan Fixed my " ERROR: operator does not exist: character varying = boolean" issue. Thanks!
Thanks for the video! Why do we want to use posgres in docker?
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.
Where do you get the AutoWiringSpringBeanJobFactory? I can't import it.
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
can I pull quartz image ? I am doing POC on quartz for my project
any quartz image you know, i am new to docker
@@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
@@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 ?
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
Thanks Tech Tutor!
You're welcome!