当前位置:网站首页>Quartz database storage
Quartz database storage
2022-06-13 05:26:00 【Lee_ mons】
( One ) build SpringBoot project
1. newly build spring project , Check quartz scheduler
2. Go to the official website to download quartz Built in table

3. find table-mysql The database script for is in idea Running scripts inside


4. Run the following sql Script
create table t_schedule_trigger
(
id bigint primary key auto_increment comment ' Trigger number ',
cron varchar(200) not null comment ' Flip-flop expression ',
status char(1) not null comment ' Trigger state : Ban Enable ',
job_name varchar(200) not null comment ' The name of the task : The full path of the stored task class ',
job_group varchar(200) not null comment ' The group in which the task is located ',
job_description varchar(200) not null comment ' Task description ',
trigger_description varchar(200) not null comment ' Trigger description ',
unique index (job_name, job_group) comment ' adopt jobName and jobGroup To make sure trigger Uniqueness , So these two columns are the joint unique index '
);
create table t_schedule_trigger_data
(
id bigint primary key auto_increment comment ' Data number ',
name varchar(200) not null comment ' The corresponding data name ',
value varchar(512) comment ' Corresponding data values ',
trigger_id bigint not null comment ' Foreign keys : quote t_schedule_trigger(id)',
foreign key (trigger_id) references t_schedule_trigger (id)
);5. Insert analog data into the two tables shipped out

( Two ) Tool class parsing
1. Import pox.xml The configuration file
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.lsy</groupId>
<artifactId>quartz_02</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>quartz_02</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<spring-boot.version>2.4.1</spring-boot.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-quartz</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.2.8</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-spring-boot-starter</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<mainClass>com.lsy.code.Quartz02Application</mainClass>
</configuration>
<executions>
<execution>
<id>repackage</id>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
2. Import profile ( Use database storage )quartz.properties
#
#============================================================================
# Configure Main Scheduler Properties \u8C03\u5EA6\u5668\u5C5E\u6027
#============================================================================
org.quartz.scheduler.instanceName:DefaultQuartzScheduler
org.quartz.scheduler.instanceId=AUTO
org.quartz.scheduler.rmi.export:false
org.quartz.scheduler.rmi.proxy:false
org.quartz.scheduler.wrapJobExecutionInUserTransaction:false
org.quartz.threadPool.class:org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount=10
org.quartz.threadPool.threadPriority:5
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread:true
org.quartz.jobStore.misfireThreshold:60000
#============================================================================
# Configure JobStore
#============================================================================
#\u5B58\u50A8\u65B9\u5F0F\u4F7F\u7528JobStoreTX,\u4E5F\u5C31\u662F\u6570\u636E\u5E93
org.quartz.jobStore.class:org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass:org.quartz.impl.jdbcjobstore.StdJDBCDelegate
#\u4F7F\u7528\u81EA\u5DF1,\u7684\u914D\u7F6E\u6587\u4EF6
org.quartz.jobStore.useProperties:true
#\u6570\u636E\u5E93\u4E2Dquartz\u8868\u7684\u8868\u540D\u524D\u7F00
org.quartz.jobStore.tablePrefix:qrtz_
org.quartz.jobStore.dataSource:qzDS
#\u662F\u5426\u4F7F\u7528\u96C6\u7FA4(\u5982\u679C\u9879\u76EE\u53EA\u90E8\u7F72\u5230 \u4E00\u53F0\u670D\u52A1\u5668,\u5C31\u4E0D\u7528\u4E86)
org.quartz.jobStore.isClustered=true
#============================================================================
# Configure Datasources
#============================================================================
#\u914D\u7F6E\u6570\u636E\u5E93\u6E90\uFF08org.quartz.dataSource.qzDS.maxConnections: c3p0\u914D\u7F6E\u7684\u662F\u6709s\u7684,druid\u6570\u636E\u6E90\u6CA1\u6709s\uFF09
org.quartz.dataSource.qzDS.connectionProvider.class:com.lsy.code.util.DruidConnectionProvider
org.quartz.dataSource.qzDS.driver:com.mysql.cj.jdbc.Driver
org.quartz.dataSource.qzDS.URL:jdbc:mysql://127.0.0.1:3306/sys?useUnicode=true&serverTimezone=Asia/Shanghai&useSSL=false&characterEncoding=utf-8
org.quartz.dataSource.qzDS.user:root
org.quartz.dataSource.qzDS.password:123456
org.quartz.dataSource.qzDS.maxConnection:103. Import extension class DruidConnectionProvider
effect : help quartz establish Druid Connection pool
package com.lsy.code.util;
import com.alibaba.druid.pool.DruidDataSource;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.SneakyThrows;
import org.quartz.utils.ConnectionProvider;
import java.sql.Connection;
/*
#============================================================================
# JDBC
#============================================================================
org.quartz.jobqzDS.connectionProvider.class:com.zking.q03.quartz.DruidConnectionProvider
org.quartz.dataSourStore.driverDelegateClass:org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.useProperties:false
org.quartz.jobStore.dataSource:qzDS
#org.quartz.dataSource.qzDS.connectionProvider.class:org.quartz.utils.PoolingConnectionProvider
org.quartz.dataSource.ce.qzDS.driver:com.mysql.jdbc.Driver
org.quartz.dataSource.qzDS.URL:jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8
org.quartz.dataSource.qzDS.user:root
org.quartz.dataSource.qzDS.password:root
org.quartz.dataSource.qzDS.maxConnections:30
org.quartz.dataSource.qzDS.validationQuery: select 0
*/
/**
* Druid The connection pool Quartz The extension class
*
* @author hgh
*/
// help quartz Connect to database
@Data
@NoArgsConstructor
@AllArgsConstructor
public class DruidConnectionProvider implements ConnectionProvider {
/**
* Constant configuration and quartz.properties Of documents key bring into correspondence with ( Remove the prefix )
* At the same time provide set Method ,Quartz The frame automatically injects values .
*/
/**
* JDBC drive
*/
public String driver;
/**
* JDBC Connection string
*/
public String URL;
/**
* Database user name
*/
public String user;
/**
* Database user password
*/
public String password;
/**
* Maximum number of database connections
*/
public int maxConnection;
/**
* database SQL The query returns to the connection pool every time , To make sure it's still valid
*/
public String validationQuery;
private boolean validateOnCheckout;
private int idleConnectionValidationSeconds;
public String maxCachedStatementsPerConnection;
private String discardIdleConnectionsSeconds;
public static final int DEFAULT_DB_MAX_CONNECTIONS = 10;
public static final int DEFAULT_DB_MAX_CACHED_STATEMENTS_PER_CONNECTION = 120;
/**
* Druid Connection pool
*/
private DruidDataSource datasource;
@Override
@SneakyThrows
public Connection getConnection() {
return datasource.getConnection();
}
@Override
public void shutdown() {
datasource.close();
}
@Override
@SneakyThrows
public void initialize() {
assert this.URL != null : "DB URL cannot be null";
assert this.driver != null : "DB driver class name cannot be null!";
assert this.maxConnection > 0 : "Max connections must be greater than zero!";
datasource = new DruidDataSource();
datasource.setDriverClassName(this.driver);
datasource.setUrl(this.URL);
datasource.setUsername(this.user);
datasource.setPassword(this.password);
datasource.setMaxActive(this.maxConnection);
datasource.setMinIdle(1);
datasource.setMaxWait(0);
datasource.setMaxPoolPreparedStatementPerConnectionSize(DruidConnectionProvider.DEFAULT_DB_MAX_CACHED_STATEMENTS_PER_CONNECTION);
if (this.validationQuery != null) {
datasource.setValidationQuery(this.validationQuery);
if (!this.validateOnCheckout) {
datasource.setTestOnReturn(true);
} else {
datasource.setTestOnBorrow(true);
}
datasource.setValidationQueryTimeout(this.idleConnectionValidationSeconds);
}
}
}4. Import MyJobFactory class
effect : Give Way quartz With and spring Interactive functions
package com.lsy.code.util;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.quartz.spi.TriggerFiredBundle;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.scheduling.quartz.AdaptableJobFactory;
import org.springframework.stereotype.Component;
/**
* @author hgh
*/
@Component
@Slf4j
public class MyJobFactory extends AdaptableJobFactory {
private final AutowireCapableBeanFactory autowireCapableBeanFactory;
@Autowired
public MyJobFactory(AutowireCapableBeanFactory autowireCapableBeanFactory) {
this.autowireCapableBeanFactory = autowireCapableBeanFactory;
}
/**
* Rewrite create Job Instance method of the task , solve Job The task cannot be used Spring Medium Bean problem
*/
@Override
@SneakyThrows
protected Object createJobInstance(TriggerFiredBundle bundle) {
Object jobInstance = super.createJobInstance(bundle);
// Give this object an operation springBean The ability of
autowireCapableBeanFactory.autowireBean(jobInstance);
return super.createJobInstance(bundle);
}
}5. Import QuartzConfiguration Configuration class
effect : Give the scheduler to spring management , In the future, the scheduler is required for other types of applications , Just inject it directly
package com.lsy.code.conf;
import com.lsy.code.util.MyJobFactory;
import com.lsy.code.util.MyJobFactory;
import lombok.SneakyThrows;
import org.quartz.Scheduler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.PropertiesFactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.scheduling.quartz.SchedulerFactoryBean;
import java.util.Properties;
/**
* @author hgh
*/
// Configuration class The purpose of this class is to quartz And database and spring Interworking
@Configuration
public class QuartzConfiguration {
private final MyJobFactory myJobFactory;
@Autowired
public QuartzConfiguration(MyJobFactory myJobFactory) {
this.myJobFactory = myJobFactory;
}
/**
* Create scheduler factory
*/
@Bean
public SchedulerFactoryBean schedulerFactoryBean() {
//1. establish SchedulerFactoryBean
SchedulerFactoryBean factoryBean = new SchedulerFactoryBean();
//2. Load custom quartz.properties The configuration file
factoryBean.setQuartzProperties(quartzProperties());
//3. Set up MyJobFactory
factoryBean.setJobFactory(myJobFactory);
return factoryBean;
}
@Bean
@SneakyThrows
public Properties quartzProperties() {
PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean();
propertiesFactoryBean.setLocation(new ClassPathResource("/quartz.properties"));
propertiesFactoryBean.afterPropertiesSet();
return propertiesFactoryBean.getObject();
}
@Bean
public Scheduler scheduler() {
return schedulerFactoryBean().getScheduler();
}
}
6. To write application.yml file
notes : Remember to change the database connection name
spring:
datasource:
url: jdbc:mysql://127.0.0.1:3306/sys?useUnicode=true&serverTimezone=Asia/Shanghai&useSSL=false&characterEncoding=utf-8
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
druid:
initial-size: 5 # Initialization size
min-idle: 10 # Minimum connections
max-active: 20 # maximum connection
max-wait: 60000 # Get the maximum waiting time for a connection
min-evictable-idle-time-millis: 300000 # The minimum lifetime of a connection in the pool , In milliseconds
time-between-eviction-runs-millis: 60000 # How often do I detect idle connections that need to be closed , In milliseconds
filters: stat # Configure extensions :stat- Monitoring statistics ,log4j- journal ,wall- A firewall ( prevent SQL Inject ), After removal , Monitoring interface sql Unable to statistics ,wall
validation-query: SELECT 1 # Check if the connection is valid SQL sentence , When empty, none of the following three configurations are valid
test-on-borrow: true # Execute on connection request validationQuery Check whether the connection is valid , Default true, When turned on, performance will be reduced
test-on-return: true # Execute... When returning the connection validationQuery Check whether the connection is valid , Default false, When turned on, performance will be reduced
test-while-idle: true # When applying for a connection, if the idle time is greater than timeBetweenEvictionRunsMillis, perform validationQuery Check whether the connection is valid , Default false, Recommended Opening , No performance impact
stat-view-servlet:
enabled: true # Open or not StatViewServlet
allow: 127.0.0.1 # Visit the monitoring page White list , Default 127.0.0.1
deny: 192.168.56.1 # Visit the monitoring page The blacklist
login-username: admin # Visit the monitoring page Login account
login-password: 123 # Visit the monitoring page password
filter:
stat:
enabled: true # Open or not FilterStat, Default true
log-slow-sql: true # Open or not slow SQL Record , Default false
slow-sql-millis: 5000 # slow SQL Standards for , Default 3000, Company : millisecond
merge-sql: false # Merging monitoring data from multiple connection pools , Default false
application:
name: quartz_02
freemarker:
# Appoint HttpServletRequest Whether the properties of can be overridden controller Of model With the same name
allow-request-override: false
#req visit request
request-context-attribute: req
# Suffix name freemarker The default suffix is .ftl, Of course, you can also change your habit .html
suffix: .ftl
# Set the content type of the response
content-type: text/html;charset=utf-8
# Whether to allow mvc Use freemarker
enabled: true
# Open or not template caching
cache: false
# Set the loading path of the template , Multiple separated by commas , Default : [“classpath:/templates/”]
template-loader-path: classpath:/templates/
# Set up Template The coding
charset: UTF-8
logging:
level:
com.yk.code.mapper: debug
( 3、 ... and ) Database storage code development
1. Entity class
package com.lsy.code.pojo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import tk.mybatis.mapper.annotation.KeySql;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
/**
* @author hgh
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
@Accessors(chain = true)
@Table(name = "t_schedule_trigger")
public class ScheduleTrigger {
@Id
@KeySql(useGeneratedKeys = true)
@Column(name = "id")
private Long id;
@Column(name = "cron")
private String cron;
@Column(name = "status")
private String status;
@Column(name = "job_name")
private String jobName;
@Column(name = "job_group")
private String jobGroup;
@Column(name = "job_description")
private String JobDescription;
@Column(name = "trigger_description")
private String TriggerDescription;
}package com.lsy.code.pojo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import tk.mybatis.mapper.annotation.KeySql;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
/**
* @author hgh
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
@Accessors(chain = true)
@Table(name = "t_schedule_trigger_data")
public class ScheduleTriggerData {
@Id
@KeySql(useGeneratedKeys = true)
@Column(name = "id", nullable = false)
private Long id;
@Column(name = "name")
private String name;
@Column(name = "value")
private String value;
@Column(name = "trigger_id")
private Long triggerId;
}2.mapper class
Inherit common mapper
package com.lsy.code.mapper;
import com.lsy.code.pojo.ScheduleTrigger;
import com.lsy.code.pojo.ScheduleTriggerData;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;
@Repository
public interface ScheduleTriggerDataMapper extends Mapper<ScheduleTriggerData> {
}
package com.lsy.code.mapper;
import com.lsy.code.pojo.ScheduleTrigger;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;
@Repository
public interface ScheduleTriggerMapper extends Mapper<ScheduleTrigger> {
}
3.service Interface class
package com.lsy.code.service;
import com.lsy.code.pojo.ScheduleTriggerData;
import java.util.List;
public interface ScheduleTriggerDataService {
List<ScheduleTriggerData> find(Long triggerId);
}
package com.lsy.code.service;
import com.lsy.code.pojo.ScheduleTrigger;
import java.util.List;
public interface ScheduleTriggerService {
List<ScheduleTrigger> find();
}
4.service Implementation class
notes : Remember to inject service annotation
package com.lsy.code.service;
import com.lsy.code.mapper.ScheduleTriggerDataMapper;
import com.lsy.code.mapper.ScheduleTriggerMapper;
import com.lsy.code.pojo.ScheduleTriggerData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;
import java.util.List;
@Service
public class ScheduleTriggerDataServiceImpl implements ScheduleTriggerDataService {
@Autowired
private ScheduleTriggerDataMapper mapper;
@Override
public List<ScheduleTriggerData> find(Long triggerId) {
Example example=new Example(ScheduleTriggerData.class);
example.createCriteria().andEqualTo("triggerId",triggerId);
return mapper.selectByExample(example);
}
}
Query all the methods because there is no method to query according to the foreign key , So we need example
package com.lsy.code.service;
import com.lsy.code.mapper.ScheduleTriggerMapper;
import com.lsy.code.pojo.ScheduleTrigger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ScheduleTriggerServiceImpl implements ScheduleTriggerService {
@Autowired
private ScheduleTriggerMapper mapper;
@Override
public List<ScheduleTrigger> find() {
return mapper.selectAll();
}
}
5.job class
package com.lsy.code.job;
import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
public class MyJob implements Job {
@Override
public void execute(JobExecutionContext context) throws JobExecutionException {
JobDataMap data = context.getJobDetail().getJobDataMap();
System.out.println(data.get("name")+" Doing "+data.get("loc")+" Hygiene of ");
}
}
6.QuartzTask class
package com.lsy.code.util;
import com.lsy.code.job.MyJob;
import com.lsy.code.pojo.ScheduleTrigger;
import com.lsy.code.pojo.ScheduleTriggerData;
import com.lsy.code.service.ScheduleTriggerDataService;
import com.lsy.code.service.ScheduleTriggerService;
import lombok.SneakyThrows;
import org.quartz.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import static org.quartz.JobBuilder.newJob;
@Component
public class QuartzTask {
private ScheduleTriggerDataService dataService;
private ScheduleTriggerService triggerService;
private Scheduler scheduler;
@Autowired
public QuartzTask(ScheduleTriggerDataService dataService, ScheduleTriggerService triggerService,Scheduler scheduler) {
this.dataService = dataService;
this.triggerService = triggerService;
this.scheduler=scheduler;
}
@Scheduled(cron = "0/10 * * * * ?")
@SneakyThrows
public void register() {
// Go to the database to see if my two tables have changed
// Query all tasks in the database
for (ScheduleTrigger t : triggerService.find()) {
// Judge whether the task has been quartz Management of the
// Get the name and group of this task
String jobName = t.getJobName();
String jobGroup = t.getJobGroup();
String jobDescription = t.getJobDescription();
String triggerDescription = t.getTriggerDescription();
String cron = t.getCron();
// Generate a key Go to the corresponding element in the scheduler
CronTrigger trigger = (CronTrigger)scheduler.getTrigger(TriggerKey.triggerKey(jobName, jobGroup));
if(trigger==null){// There is... In my watch however quartz Not managing him
// Ban
if("0".equals(t.getStatus())){
continue;
}
// newly build Put the task on quartz Inside
// Mission job
JobDetail jobDetail = newJob((Class<? extends Job>) Class.forName(jobName))
.withIdentity(jobName, jobGroup)
.withDescription(jobDescription)
.build();
// Read the data required by the task
for (ScheduleTriggerData data : dataService.find(t.getId())) {
// Put the required task data into the task
jobDetail.getJobDataMap().put(data.getName(),data.getValue());
}
// trigger Trigger
trigger = TriggerBuilder.newTrigger()
.withIdentity(jobName,jobGroup)
.withDescription(triggerDescription)
.withSchedule(CronScheduleBuilder.cronSchedule(cron))
.build();
// Assigned to the scheduler
scheduler.scheduleJob(jobDetail,trigger);
continue;
}
// The task is already quartz There is
if("0".equals(t.getStatus())){
// stay quartz Delete that task from
scheduler.deleteJob(JobKey.jobKey(jobName,jobGroup));
continue;
}
// The task exists and is not disabled
// Determine whether the expression has been modified
if (!trigger.getCronExpression().equals(cron)) {
// trigger Trigger
trigger = TriggerBuilder.newTrigger()
.withIdentity(jobName,jobGroup)
.withDescription(triggerDescription)
.withSchedule(CronScheduleBuilder.cronSchedule(cron))
.build();
// Let the scheduler replace the trigger
//rescheduleJob() Reschedule work
scheduler.rescheduleJob(TriggerKey.triggerKey(jobName, jobGroup),trigger);
}
}
}
}
7. The operation results are as follows

边栏推荐
- std::condition_ variable::wait_ for
- C language learning log 1.2
- 890. Find and Replace Pattern
- Explain the opencv function cv:: add() in detail, and attach sample code and running results of various cases
- The problem of flex layout adaptive failure
- Wang Dao Chapter II linear table exercises
- Luogu p1088 Martians
- Case - count the number of occurrences of each string in the string
- Pychart encountered time zone problem when connecting to MySQL timezone
- Introduction to R language 4--- R language process control
猜你喜欢

行情绘图课程大纲1-基础知识

Bm1z002fj-evk-001 startup evaluation

Search DFS and BFS

890. Find and Replace Pattern

Use the browser to cut the entire page (take chrome as an example)

Simple greedy strategy

About Evaluation Metrics

Simple SR: best buddy Gans for highly detailed image super resolution

External sort

Hainan University Postgraduate Entrance Examination electronic information (085400) landing experience
随机推荐
C language learning log 2.19
[multithreading] thread pool core class -threadpoolexecutor
mongo
Luogu p1036 number selection
17.6 unique_lock详解
Browser screenshot method (long screenshot, node screenshot, designated area screenshot)
使用cmake交叉編譯helloworld
Simple SR: best buddy Gans for highly detailed image super resolution
Redis plus instructions
KVM hot migration for KVM virtual management
Solve the problem of garbled code in the MySQL execution SQL script database in docker (no need to rebuild the container)
C language learning log 10.8
Course outline of market drawing 1- basic knowledge
C language learning log 2.6
std::condition_ variable::wait_ for
C language learning log 10.11
Luogu p3654 fisrt step
Standard input dialog for pyqt5 qinputdialog
Pychart professional edition's solution to SQL script error reporting
Listiterator list iterator