GithubHelp home page GithubHelp logo

quartz-shedlock-migration's Introduction

Quartz Shedlock Migration

Overview

Quartz Shedlock Migration is a Java/Spring Boot project that utilizes Quartz Scheduler and Shedlock to provide distributed lock functionality for scheduled tasks. This project is built using Maven and requires JDK 21 or later.

Features

  • Integration of Quartz Scheduler for job scheduling.
  • Use of Shedlock for distributed lock management.
  • Maven for project build and dependency management.
  • Developed and tested with JDK 21.

Prerequisites

Make sure you have the following installed on your machine:

Getting Started with Maven

1. Clone the repository:

git clone https://github.com/korkutkose/quartz-shedlock-migration.git
cd quartz-shedlock-migration

2. Install and Run The Application:

mvn clean install
mvn spring-boot:run 

3. Enable Different Profile

  • By default, the application runs with the shedlock profile.
  • To enable the quartz profile, you can use the following command:
    mvn spring-boot:run -Dspring-boot.run.profiles=quartz

4. Build Native Image Locally

Do not forget to install and set the GRAALVM_HOME environment variable to the GraalVM installation directory.

  • To build a native image of the application, you can use the following command:
    mvn clean package -Pnative native:compile
  • To run the native image, you can use the following command:
    ./target/native-executable-app 
  • To run the native image with profile, you can use the following command:
    ./target/native-executable-app --spring.profiles.active=quartz

Getting Started with Docker

Do not forget to install Docker on your machine and make sure that the Docker daemon is running.

  1. Run docker-compose to build and run the application:

    This will take some time to build since this will be a multi-stage GraalVM native build.

    docker-compose -f docker-compose.yml -p quartz-shedlock-migration up -d
  2. You can also provide additional profile while running the docker-compose command:
    APP_ACTIVE_PROFILE=quartz docker-compose -f docker-compose.yml -p quartz-shedlock-migration up -d
  3. Check the logs to see if the application is running:
    docker-compose -f docker-compose.yml -p quartz-shedlock-migration logs -f
  4. To stop the application, you can use the following command:
    docker-compose -f docker-compose.yml -p quartz-shedlock-migration down

Contact

If you want to contact me you can reach me at;

quartz-shedlock-migration's People

Contributors

korkutkose avatar mehmetkorkutkose avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

bassista

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.