# quartz-redis
**Repository Path**: attemper/quartz-redis
## Basic Information
- **Project Name**: quartz-redis
- **Description**: 使用Redis作为分布式存储和锁的Quartz JobStore
- **Primary Language**: Java
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 5
- **Forks**: 10
- **Created**: 2020-04-23
- **Last Updated**: 2024-11-22
## Categories & Tags
**Categories**: task-schedule
**Tags**: None
## README
# quartz-redis
>A JobStore of [Quartz Scheduler](http://quartz-scheduler.org/) using Redis that supports data storage and distributed lock. [中文](./README_zh_CN.md)
**Used by**
>👉 Attemper: A distributed,multi-tenancy,job-flow scheduling application 👈
>>[Github](https://github.com/attemper/attemper)
>>[Gitee](https://gitee.com/attemper/attemper)
## Features
- Support redis's distributed lock
- Support redis's cluster and sentinel mode
## Configurations
- Add dependency to `pom.xml`
``` xml
com.github.attemper
quartz-redis
0.9.2
```
- Config `org.quartz.jobStore.xxx`
To use quartz-redis,you can config like the following properties in `quartz.properties`.
If you want to use it in spring-boot apps, it's the same configurations in `.yml` or `.properties`
```
# job store class
org.quartz.jobStore.class = com.github.quartz.impl.redisjobstore.RedisJobStore
# redis host (optional)
org.quartz.jobStore.host =
# redis password (optional)
org.quartz.jobStore.password =
# redis port (optional)
org.quartz.jobStore.port =
# redis database (optional)
org.quartz.jobStore.database =
# see https://lettuce.io/core/release/reference/index.html#redisuri.uri-syntax
org.quartz.jobStore.uri =
# redis cluster mode
org.quartz.jobStore.clusterNodes =
# redis sentinel mode
org.quartz.jobStore.sentinelNodes =
# redis sentinel matser name
org.quartz.jobStore.sentinelMaster =
# enable ssl or not (optional)
org.quartz.jobStore.ssl =
```
- you should config one of
- host,password,port and database
- uri
- clusterNodes
- sentinelNodes and sentinelMaster
## Dependencies
`quartz-redis` depends on the flowing project
- [`quartz-core@com.github.attemper`](https://github.com/attemper/quartz)
In the quartz,I add some functions to satisfy my requirements
However, you can also use [Quartz Scheduler](http://quartz-scheduler.org/)
- [`lettuce-core@io.lettuce`](https://github.com/lettuce-io/lettuce-core)
A redis client which used by spring-boot2.x
- `jackson-databind@com.fasterxml.jackson.core`
Serialize and deserialize job/trigger/calendar via it
```xml
com.github.attemper
quartz-core
2.3.2.2
io.lettuce
lettuce-core
5.x
com.fasterxml.jackson.core
jackson-databind
2.x
```