https://github.com/shravan20/springboot-jobrunnr-cron
Creating Distributed Cron Jobs using Spring Boot
https://github.com/shravan20/springboot-jobrunnr-cron
Last synced: 6 months ago
JSON representation
Creating Distributed Cron Jobs using Spring Boot
- Host: GitHub
- URL: https://github.com/shravan20/springboot-jobrunnr-cron
- Owner: shravan20
- Created: 2021-05-05T13:51:57.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-11T11:12:59.000Z (over 3 years ago)
- Last Synced: 2025-02-09T19:17:29.330Z (8 months ago)
- Language: Java
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Springboot-JobRunnr-Cron
`Creating Distributed Cron Jobs using Spring Boot`### Requirements
- JobRunr Dep
- JSON parser Library [Jackson / GSON / Json-B]
- ASM [ASM is an all purpose Java bytecode manipulation and analysis framework]
#### Important Note
```
All your servers must run the same version of your code. If your webapp server has a
newer version with a method signature
that is not compatible with the server that processes your background jobs,
a NoSuchMethod Exception will be thrown
and job processing will fail!
```### Work flow of JobRunnr:
- When enqueueing a background job, the lambda is decomposed and saved into the storage provider as Json.
- JobRunr returns immediately to the caller so that it is not blocking
- One or more background job servers poll the storage provider for new enqueued jobs and process them
- When finished, it updates the state in the storage provider and fetches the next job to perform