Skip to content

Commit fa4ede5

Browse files
authored
Merge pull request #108 from midhunadarvin/feat/configure-auto-startup
feat: make autoStartup configurable for SchedulerFactoryBean
2 parents 82a60eb + 3aa6720 commit fa4ede5

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

.github/workflows/sonar-java.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,27 @@ on:
77
# paths: [ 'quartz-manager-parent/**' ]
88
pull_request:
99
types: [opened, synchronize, reopened]
10-
1110
jobs:
1211
build:
1312
name: Build and analyze
1413
runs-on: ubuntu-latest
1514
steps:
16-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v3
1716
with:
1817
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
19-
- name: Set up JDK 11
20-
uses: actions/setup-java@v1
18+
- name: Set up JDK 17
19+
uses: actions/setup-java@v3
2120
with:
22-
java-version: 11
21+
java-version: 17
22+
distribution: 'zulu' # Alternative distribution options are available.
2323
- name: Cache SonarCloud packages
24-
uses: actions/cache@v1
24+
uses: actions/cache@v3
2525
with:
2626
path: ~/.sonar/cache
2727
key: ${{ runner.os }}-sonar
2828
restore-keys: ${{ runner.os }}-sonar
2929
- name: Cache Maven packages
30-
uses: actions/cache@v1
30+
uses: actions/cache@v3
3131
with:
3232
path: ~/.m2
3333
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}

quartz-manager-parent/quartz-manager-starter-api/src/main/java/it/fabioformosa/quartzmanager/api/configuration/SchedulerConfig.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ public SchedulerFactoryBean schedulerFactoryBean(@Qualifier("quartzJobFactory")
5555
if (quartzProperties != null && quartzProperties.size() > 0)
5656
mergedProperties.putAll(quartzProperties);
5757
factory.setQuartzProperties(mergedProperties);
58-
factory.setAutoStartup(false);
58+
boolean isAutoStartup = mergedProperties.getProperty("org.quartz.scheduler.isAutoStartup") != null && mergedProperties.getProperty("org.quartz.scheduler.isAutoStartup").equals("true");
59+
factory.setAutoStartup(isAutoStartup);
5960
return factory;
6061
}
6162
}

0 commit comments

Comments
 (0)