Skip to content

Commit 82ca186

Browse files
committed
feat: make autoStartup configurable for SchedulerFactoryBean
- check property `org.quartz.scheduler.isAutoStartup` and enable autoStartup if it is true
1 parent 82a60eb commit 82ca186

File tree

1 file changed

+2
-1
lines changed
  • quartz-manager-parent/quartz-manager-starter-api/src/main/java/it/fabioformosa/quartzmanager/api/configuration

1 file changed

+2
-1
lines changed

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)