Search in sources :

Example 26 with SchedulerFactoryBean

use of org.springframework.scheduling.quartz.SchedulerFactoryBean in project Settler by EmhyrVarEmreis.

the class SchedulerConfiguration method schedulerFactoryBean.

@Bean
public SchedulerFactoryBean schedulerFactoryBean(JobFactory jobFactory, DataSource dataSource) {
    log.debug("Creating SchedulerFactoryBean");
    SchedulerFactoryBean factoryBean = new SchedulerFactoryBean();
    factoryBean.setSchedulerName("defaultScheduler");
    factoryBean.setStartupDelay(15);
    factoryBean.setWaitForJobsToCompleteOnShutdown(true);
    factoryBean.setConfigLocation(new ClassPathResource("quartz.properties"));
    factoryBean.setJobFactory(jobFactory);
    factoryBean.setDataSource(dataSource);
    return factoryBean;
}
Also used : SchedulerFactoryBean(org.springframework.scheduling.quartz.SchedulerFactoryBean) ClassPathResource(org.springframework.core.io.ClassPathResource) Bean(org.springframework.context.annotation.Bean) SchedulerFactoryBean(org.springframework.scheduling.quartz.SchedulerFactoryBean)

Example 27 with SchedulerFactoryBean

use of org.springframework.scheduling.quartz.SchedulerFactoryBean in project dq-easy-cloud by dq-open-cloud.

the class EcTaskSchedulerConfig method schedulerFactoryBean.

@Bean(name = "schedulerFactoryBean")
public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource, JobFactory jobFactory) throws Exception {
    SchedulerFactoryBean factory = new SchedulerFactoryBean();
    factory.setDataSource(dataSource);
    factory.setJobFactory(jobFactory);
    factory.setQuartzProperties(quartzProperties());
    factory.afterPropertiesSet();
    factory.setStartupDelay(10);
    factory.setAutoStartup(true);
    return factory;
}
Also used : SchedulerFactoryBean(org.springframework.scheduling.quartz.SchedulerFactoryBean) PropertiesFactoryBean(org.springframework.beans.factory.config.PropertiesFactoryBean) Bean(org.springframework.context.annotation.Bean) SchedulerFactoryBean(org.springframework.scheduling.quartz.SchedulerFactoryBean)

Example 28 with SchedulerFactoryBean

use of org.springframework.scheduling.quartz.SchedulerFactoryBean in project topcom-cloud by 545314690.

the class SchedledConfiguration method schedulerFactoryBean.

@Bean
public SchedulerFactoryBean schedulerFactoryBean() {
    SchedulerFactoryBean scheduler = new SchedulerFactoryBean();
    scheduler.setJobFactory(autoWiringSpringBeanJobFactory());
    return scheduler;
}
Also used : SchedulerFactoryBean(org.springframework.scheduling.quartz.SchedulerFactoryBean) Bean(org.springframework.context.annotation.Bean) SchedulerFactoryBean(org.springframework.scheduling.quartz.SchedulerFactoryBean)

Aggregations

SchedulerFactoryBean (org.springframework.scheduling.quartz.SchedulerFactoryBean)28 Bean (org.springframework.context.annotation.Bean)20 PropertiesFactoryBean (org.springframework.beans.factory.config.PropertiesFactoryBean)7 ClassPathResource (org.springframework.core.io.ClassPathResource)6 IOException (java.io.IOException)5 Properties (java.util.Properties)5 Test (org.junit.jupiter.api.Test)3 JobDetail (org.quartz.JobDetail)3 Trigger (org.quartz.Trigger)3 CoreException (eu.bcvsolutions.idm.core.api.exception.CoreException)2 Map (java.util.Map)2 PostConstruct (javax.annotation.PostConstruct)2 SchedulerException (org.quartz.SchedulerException)2 ServerSettings (com.radensolutions.reporting.service.ServerSettings)1 Job (com.weicoder.frame.quartz.Job)1 SchedulerManager (eu.bcvsolutions.idm.core.scheduler.api.service.SchedulerManager)1 DefaultSchedulerManager (eu.bcvsolutions.idm.core.scheduler.service.impl.DefaultSchedulerManager)1 ParseException (java.text.ParseException)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1