{"id":21877625,"url":"https://github.com/rbiedrawa/spring-quartz-flyway-poc","last_synced_at":"2026-04-07T08:32:16.466Z","repository":{"id":162193130,"uuid":"477606570","full_name":"rbiedrawa/spring-quartz-flyway-poc","owner":"rbiedrawa","description":"This repository demonstrates how to schedule jobs in Spring Boot application with Quartz Clustered mode.","archived":false,"fork":false,"pushed_at":"2022-04-08T07:12:40.000Z","size":74,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T23:43:26.517Z","etag":null,"topics":["backoff-strategy","cluster","docker","docker-compose","flyway","flyway-postgresql","gradle","java","job-scheduler","postgresql","quartz","quartz-scheduler","retry","scheduled-jobs","scheduled-tasks","scheduler","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rbiedrawa.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-04T08:11:13.000Z","updated_at":"2023-02-21T21:14:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"ef4b295e-ec6a-4204-bf1c-8cfacf8d32f1","html_url":"https://github.com/rbiedrawa/spring-quartz-flyway-poc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rbiedrawa/spring-quartz-flyway-poc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbiedrawa%2Fspring-quartz-flyway-poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbiedrawa%2Fspring-quartz-flyway-poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbiedrawa%2Fspring-quartz-flyway-poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbiedrawa%2Fspring-quartz-flyway-poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rbiedrawa","download_url":"https://codeload.github.com/rbiedrawa/spring-quartz-flyway-poc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbiedrawa%2Fspring-quartz-flyway-poc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31506562,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backoff-strategy","cluster","docker","docker-compose","flyway","flyway-postgresql","gradle","java","job-scheduler","postgresql","quartz","quartz-scheduler","retry","scheduled-jobs","scheduled-tasks","scheduler","spring-boot"],"created_at":"2024-11-28T08:09:48.186Z","updated_at":"2026-04-07T08:32:16.437Z","avatar_url":"https://github.com/rbiedrawa.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scheduling jobs in Spring with Quartz Clustered mode - PoC\n\nThis repository demonstrates how to schedule jobs in Spring Boot application with Quartz Clustered mode.\n\n\n## Features\n\n* Retry Pattern With Exponential Back-Off\n* Quartz Clustered Mode\n* PostgreSQL DB\n* Flyway\n* Docker / Docker Compose\n\n## Getting Started\n\n### Prerequisites:\n\n* Java 11\n* Docker\n\n### Installation\n\nBuild docker image\n\n```shell\n./gradlew bootBuildImage\n```\n\n### Usage:\n\n1. Start services.\n    ```shell\n    cd docker\n    docker compose up -d\n    ```\n2. Check if all services are running.\n    ```shell\n    docker compose ps\n    ```\n3. Schedule new todo job.\n   ```shell\n   curl --location --request POST 'http://localhost:8080/api/v1/todos' \\\n   --header 'Content-Type: application/json' \\\n   --data-raw '{\n       \"id\": 2\n   }'\n   ```\n4. Simulate failure.\n   ```shell\n   curl --location --request POST 'http://localhost:8080/api/v1/todos' \\\n   --header 'Content-Type: application/json' \\\n   --data-raw '{\n       \"id\": 1\n   }'\n   ```\n5. Check logs and verify if retry with exponential backoff works.\n   ```shell\n   docker compose logs -f\n   # ...\n   # 2022-04-08 08:40:35.884 ERROR 84542 --- [z-demo_Worker-1] com.rbiedrawa.app.todos.TodoJob          : Todo [1] is odd - simulating failure😈\n   # 2022-04-08 08:40:35.888 ERROR 84542 --- [z-demo_Worker-1] c.r.app.core.scheduler.RetryableJobBean  : Job todoGroup.todoJob-1 failed with exception. Rescheduling...\n   # java.lang.RuntimeException: Todo 1 is odd\n   # 2022-04-08 08:40:35.920  INFO 84542 --- [z-demo_Worker-1] c.r.app.core.scheduler.RetryableJobBean  : Successfully rescheduled job todoGroup.todoJob-1 using new trigger todoGroup.todoJob-1 \n   # \n   # 2022-04-08 08:40:39.931 ERROR 84542 --- [z-demo_Worker-2] com.rbiedrawa.app.todos.TodoJob          : Todo [1] is odd - simulating failure😈\n   # 2022-04-08 08:40:39.931 ERROR 84542 --- [z-demo_Worker-2] c.r.app.core.scheduler.RetryableJobBean  : Job todoGroup.todoJob-1 failed with exception. Rescheduling...\n   # java.lang.RuntimeException: Todo 1 is odd\n   # 2022-04-08 08:40:39.954  INFO 84542 --- [z-demo_Worker-2] c.r.app.core.scheduler.RetryableJobBean  : Successfully rescheduled job todoGroup.todoJob-1 using new trigger todoGroup.todoJob-1 \n   # ...\n   ```\n6. Open [Adminer](http://localhost:8081/) and investigate database structure. Connection details:\n    * System: PostgresSQL\n    * Server: db\n    * Username: demo\n    * Password: demo\n    * Database: demo\n7. Stop services.\n   ```shell\n   docker compose down -v\n   ```\n\n## References\n\nFor further reference, please consider the following sections:\n\n* [Quartz - Job Scheduling](http://www.quartz-scheduler.org/)\n* [Flyway](https://flywaydb.org/)\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbiedrawa%2Fspring-quartz-flyway-poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frbiedrawa%2Fspring-quartz-flyway-poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbiedrawa%2Fspring-quartz-flyway-poc/lists"}