-
-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
598 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
Db-scheduler | ||
|
||
Copyright 2015 Gustav Karlsson. All Rights Reserved. | ||
|
||
This product includes software developed by Gustav Karlsson. | ||
Licensed under Apache 2 - http://www.apache.org/licenses/LICENSE-2.0.html | ||
|
||
|
||
This software includes third party software subject to the following licenses: | ||
|
||
AntLR Parser Generator under BSD License | ||
Apache Log4j API under Apache License, Version 2.0 | ||
Apache Log4j to SLF4J Adapter under Apache License, Version 2.0 | ||
ASM based accessors helper used by json-smart under The Apache Software License, Version 2.0 | ||
ASM Core under BSD | ||
AspectJ weaver under Eclipse Public License - v 1.0 | ||
AssertJ fluent assertions under Apache License, Version 2.0 | ||
Bean Validation API under Apache License 2.0 | ||
Byte Buddy (without dependencies) under Apache License, Version 2.0 | ||
Byte Buddy Java agent under Apache License, Version 2.0 | ||
ClassMate under The Apache Software License, Version 2.0 | ||
cron-utils under Apache 2.0 | ||
DB Scheduler: Core under The Apache Software License, Version 2.0 | ||
DB Scheduler: Examples under The Apache Software License, Version 2.0 | ||
DB Scheduler: Examples: Spring Boot under The Apache Software License, Version 2.0 | ||
DB Scheduler: Spring Boot Starter under The Apache Software License, Version 2.0 | ||
dom4j under BSD 3-clause New License | ||
Guava: Google Core Libraries for Java under The Apache Software License, Version 2.0 | ||
Hamcrest Core under New BSD License | ||
Hamcrest library under New BSD License | ||
HdrHistogram under Public Domain, per Creative Commons CC0 | ||
Hibernate Commons Annotations under GNU Lesser General Public License v2.1 or later | ||
Hibernate ORM - hibernate-core under GNU Library General Public License v2.1 or later | ||
Hibernate Validator Engine under Apache License 2.0 | ||
HikariCP under The Apache Software License, Version 2.0 | ||
HyperSQL Database under HSQLDB License, a BSD open source license | ||
Jackson datatype: jdk8 under The Apache Software License, Version 2.0 | ||
Jackson datatype: JSR310 under The Apache Software License, Version 2.0 | ||
Jackson-annotations under The Apache Software License, Version 2.0 | ||
Jackson-core under The Apache Software License, Version 2.0 | ||
jackson-databind under The Apache Software License, Version 2.0 | ||
Jackson-module-parameter-names under The Apache Software License, Version 2.0 | ||
Java Annotation Indexer under Apache License, Version 2.0 | ||
JavaBeans Activation Framework API jar under CDDL/GPLv2+CE | ||
Javassist under MPL 1.1 or LGPL 2.1 or Apache License 2.0 | ||
javax.annotation API under CDDL + GPLv2 with classpath exception | ||
javax.persistence-api under Eclipse Public License v1.0 or Eclipse Distribution License v. 1.0 | ||
javax.transaction API under CDDL + GPLv2 with classpath exception | ||
jaxb-api under CDDL 1.1 or GPL2 w/ CPE | ||
JBoss Logging 3 under Apache License, version 2.0 | ||
JSON library from Android SDK under Apache License 2.0 | ||
JSON Small and Fast Parser under The Apache Software License, Version 2.0 | ||
JSONassert under The Apache Software License, Version 2.0 | ||
JUL to SLF4J bridge under MIT License | ||
JUnit under Eclipse Public License 1.0 | ||
LatencyUtils under Public Domain, per Creative Commons CC0 | ||
Logback Classic Module under Eclipse Public License - v 1.0 or GNU Lesser General Public License | ||
Logback Core Module under Eclipse Public License - v 1.0 or GNU Lesser General Public License | ||
Micro JDBC under The Apache Software License, Version 2.0 | ||
micrometer-core under The Apache Software License, Version 2.0 | ||
mockito-core under The MIT License | ||
Objenesis under Apache 2 | ||
org.xmlunit:xmlunit-core under The Apache Software License, Version 2.0 | ||
project ':json-path' under The Apache Software License, Version 2.0 | ||
SLF4J API Module under MIT License | ||
SnakeYAML under Apache License, Version 2.0 | ||
Spring AOP under Apache License, Version 2.0 | ||
Spring Aspects under Apache License, Version 2.0 | ||
Spring Beans under Apache License, Version 2.0 | ||
Spring Boot under Apache License, Version 2.0 | ||
Spring Boot Actuator under Apache License, Version 2.0 | ||
Spring Boot Actuator AutoConfigure under Apache License, Version 2.0 | ||
Spring Boot Actuator Starter under Apache License, Version 2.0 | ||
Spring Boot AOP Starter under Apache License, Version 2.0 | ||
Spring Boot AutoConfigure under Apache License, Version 2.0 | ||
Spring Boot Data JPA Starter under Apache License, Version 2.0 | ||
Spring Boot JDBC Starter under Apache License, Version 2.0 | ||
Spring Boot Json Starter under Apache License, Version 2.0 | ||
Spring Boot Logging Starter under Apache License, Version 2.0 | ||
Spring Boot Starter under Apache License, Version 2.0 | ||
Spring Boot Test under Apache License, Version 2.0 | ||
Spring Boot Test Auto-Configure under Apache License, Version 2.0 | ||
Spring Boot Test Starter under Apache License, Version 2.0 | ||
Spring Boot Tomcat Starter under Apache License, Version 2.0 | ||
Spring Boot Web Starter under Apache License, Version 2.0 | ||
Spring Commons Logging Bridge under Apache License, Version 2.0 | ||
Spring Context under Apache License, Version 2.0 | ||
Spring Core under Apache License, Version 2.0 | ||
Spring Data Core under Apache License, Version 2.0 | ||
Spring Data JPA under Apache License, Version 2.0 | ||
Spring Expression Language (SpEL) under Apache License, Version 2.0 | ||
Spring JDBC under Apache License, Version 2.0 | ||
Spring Object/Relational Mapping under Apache License, Version 2.0 | ||
Spring TestContext Framework under Apache License, Version 2.0 | ||
Spring Transaction under Apache License, Version 2.0 | ||
Spring Web under Apache License, Version 2.0 | ||
Spring Web MVC under Apache License, Version 2.0 | ||
tomcat-embed-core under Apache License, Version 2.0 | ||
tomcat-embed-el under Apache License, Version 2.0 | ||
tomcat-embed-websocket under Apache License, Version 2.0 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>db-scheduler-parent</artifactId> | ||
<groupId>com.github.kagkarlsson</groupId> | ||
<version>5.3-SNAPSHOT</version> | ||
</parent> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
<packaging>pom</packaging> | ||
|
||
<artifactId>examples</artifactId> | ||
<name>DB Scheduler: Examples</name> | ||
<description>Examples for how to use DB Scheduler</description> | ||
|
||
<properties> | ||
<license.dir>${project.parent.basedir}/.license</license.dir> | ||
</properties> | ||
|
||
<modules> | ||
<module>spring-boot-example</module> | ||
</modules> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
Db-scheduler | ||
|
||
Copyright 2015 Gustav Karlsson. All Rights Reserved. | ||
|
||
This product includes software developed by Gustav Karlsson. | ||
Licensed under Apache 2 - http://www.apache.org/licenses/LICENSE-2.0.html | ||
|
||
|
||
This software includes third party software subject to the following licenses: | ||
|
||
AntLR Parser Generator under BSD License | ||
Apache Log4j API under Apache License, Version 2.0 | ||
Apache Log4j to SLF4J Adapter under Apache License, Version 2.0 | ||
ASM based accessors helper used by json-smart under The Apache Software License, Version 2.0 | ||
ASM Core under BSD | ||
AspectJ weaver under Eclipse Public License - v 1.0 | ||
AssertJ fluent assertions under Apache License, Version 2.0 | ||
Bean Validation API under Apache License 2.0 | ||
Byte Buddy (without dependencies) under Apache License, Version 2.0 | ||
Byte Buddy Java agent under Apache License, Version 2.0 | ||
ClassMate under The Apache Software License, Version 2.0 | ||
cron-utils under Apache 2.0 | ||
DB Scheduler: Core under The Apache Software License, Version 2.0 | ||
DB Scheduler: Examples: Spring Boot under The Apache Software License, Version 2.0 | ||
DB Scheduler: Spring Boot Starter under The Apache Software License, Version 2.0 | ||
dom4j under BSD 3-clause New License | ||
Guava: Google Core Libraries for Java under The Apache Software License, Version 2.0 | ||
Hamcrest Core under New BSD License | ||
Hamcrest library under New BSD License | ||
HdrHistogram under Public Domain, per Creative Commons CC0 | ||
Hibernate Commons Annotations under GNU Lesser General Public License v2.1 or later | ||
Hibernate ORM - hibernate-core under GNU Library General Public License v2.1 or later | ||
Hibernate Validator Engine under Apache License 2.0 | ||
HikariCP under The Apache Software License, Version 2.0 | ||
HyperSQL Database under HSQLDB License, a BSD open source license | ||
Jackson datatype: jdk8 under The Apache Software License, Version 2.0 | ||
Jackson datatype: JSR310 under The Apache Software License, Version 2.0 | ||
Jackson-annotations under The Apache Software License, Version 2.0 | ||
Jackson-core under The Apache Software License, Version 2.0 | ||
jackson-databind under The Apache Software License, Version 2.0 | ||
Jackson-module-parameter-names under The Apache Software License, Version 2.0 | ||
Java Annotation Indexer under Apache License, Version 2.0 | ||
JavaBeans Activation Framework API jar under CDDL/GPLv2+CE | ||
Javassist under MPL 1.1 or LGPL 2.1 or Apache License 2.0 | ||
javax.annotation API under CDDL + GPLv2 with classpath exception | ||
javax.persistence-api under Eclipse Public License v1.0 or Eclipse Distribution License v. 1.0 | ||
javax.transaction API under CDDL + GPLv2 with classpath exception | ||
jaxb-api under CDDL 1.1 or GPL2 w/ CPE | ||
JBoss Logging 3 under Apache License, version 2.0 | ||
JSON library from Android SDK under Apache License 2.0 | ||
JSON Small and Fast Parser under The Apache Software License, Version 2.0 | ||
JSONassert under The Apache Software License, Version 2.0 | ||
JUL to SLF4J bridge under MIT License | ||
JUnit under Eclipse Public License 1.0 | ||
LatencyUtils under Public Domain, per Creative Commons CC0 | ||
Logback Classic Module under Eclipse Public License - v 1.0 or GNU Lesser General Public License | ||
Logback Core Module under Eclipse Public License - v 1.0 or GNU Lesser General Public License | ||
Micro JDBC under The Apache Software License, Version 2.0 | ||
micrometer-core under The Apache Software License, Version 2.0 | ||
mockito-core under The MIT License | ||
Objenesis under Apache 2 | ||
org.xmlunit:xmlunit-core under The Apache Software License, Version 2.0 | ||
project ':json-path' under The Apache Software License, Version 2.0 | ||
SLF4J API Module under MIT License | ||
SnakeYAML under Apache License, Version 2.0 | ||
Spring AOP under Apache License, Version 2.0 | ||
Spring Aspects under Apache License, Version 2.0 | ||
Spring Beans under Apache License, Version 2.0 | ||
Spring Boot under Apache License, Version 2.0 | ||
Spring Boot Actuator under Apache License, Version 2.0 | ||
Spring Boot Actuator AutoConfigure under Apache License, Version 2.0 | ||
Spring Boot Actuator Starter under Apache License, Version 2.0 | ||
Spring Boot AOP Starter under Apache License, Version 2.0 | ||
Spring Boot AutoConfigure under Apache License, Version 2.0 | ||
Spring Boot Data JPA Starter under Apache License, Version 2.0 | ||
Spring Boot JDBC Starter under Apache License, Version 2.0 | ||
Spring Boot Json Starter under Apache License, Version 2.0 | ||
Spring Boot Logging Starter under Apache License, Version 2.0 | ||
Spring Boot Starter under Apache License, Version 2.0 | ||
Spring Boot Test under Apache License, Version 2.0 | ||
Spring Boot Test Auto-Configure under Apache License, Version 2.0 | ||
Spring Boot Test Starter under Apache License, Version 2.0 | ||
Spring Boot Tomcat Starter under Apache License, Version 2.0 | ||
Spring Boot Web Starter under Apache License, Version 2.0 | ||
Spring Commons Logging Bridge under Apache License, Version 2.0 | ||
Spring Context under Apache License, Version 2.0 | ||
Spring Core under Apache License, Version 2.0 | ||
Spring Data Core under Apache License, Version 2.0 | ||
Spring Data JPA under Apache License, Version 2.0 | ||
Spring Expression Language (SpEL) under Apache License, Version 2.0 | ||
Spring JDBC under Apache License, Version 2.0 | ||
Spring Object/Relational Mapping under Apache License, Version 2.0 | ||
Spring TestContext Framework under Apache License, Version 2.0 | ||
Spring Transaction under Apache License, Version 2.0 | ||
Spring Web under Apache License, Version 2.0 | ||
Spring Web MVC under Apache License, Version 2.0 | ||
tomcat-embed-core under Apache License, Version 2.0 | ||
tomcat-embed-el under Apache License, Version 2.0 | ||
tomcat-embed-websocket under Apache License, Version 2.0 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Spring Boot Example | ||
|
||
This Maven module provides a working example of the [db-scheduler](https://github.com/kagkarlsson/db-scheduler) running in a Spring Boot application using the provided Spring Boot starter. | ||
|
||
## Prerequisites | ||
|
||
- An existing Spring Boot application | ||
- A working `DataSource` with schema initialized. (In the example HSQLDB is used and schema is automatically applied.) | ||
|
||
## How to use | ||
|
||
1. Add the following Maven dependency | ||
```xml | ||
<dependency> | ||
<groupId>com.github.kagkarlsson</groupId> | ||
<artifactId>db-scheduler-spring-boot-starter</artifactId> | ||
<version>5.3</version> <!-- Look up the current version --> | ||
</dependency> | ||
``` | ||
*NOTE*: This includes the db-scheduler dependency itself. | ||
2. In your configuration, expose your `Task`'s as Spring beans. If they are recurring, they will automatically be picked up and started. | ||
3. (Optional) Define a bean of type `DbSchedulerCustomizer` if you want to supply a custom naming strategy, serializer or `ExecutorService`. | ||
|
||
## Configuration options | ||
|
||
The Spring Boot integration exposes some configuration properties. For more configurability, consider defining a bean of type `DbSchedulerCustomzier`. | ||
|
||
``` | ||
# Listing with default values | ||
|
||
db-scheduler.enabled=true | ||
db-scheduler.heartbeat-interval=5m | ||
db-scheduler.polling-interval=30s | ||
db-scheduler.polling-limit= | ||
db-scheduler.table-name=scheduled_tasks | ||
db-scheduler.immediate-execution-enabled=false | ||
db-scheduler.scheduler-name= | ||
db-scheduler.threads=10 | ||
``` |
Oops, something went wrong.