#============================================================================
# Configure Main Scheduler Properties Scheduler Property
#============================================================================
# Each instance in the cluster must have a unique instanceid, but there should be an identical instancename
Org.quartz.scheduler.instanceName = Myclusteredscheduler
Org.quartz.scheduler.instanceId = AUTO
#org. Quartz.scheduler.rmi.export = False
#org. Quartz.scheduler.rmi.proxy = False
#org. Quartz.scheduler.wrapJobExecutionInUserTransaction = False
#org. Quartz.scheduler.skipUpdateCheck = True
#============================================================================
# Configure ThreadPool thread pool Properties
#============================================================================
# implementation class for thread pool (fixed thread pool to meet the needs of almost all users)
Org.quartz.threadPool.class = Org.quartz.simpl.SimpleThreadPool
# Specify the number of threads, at least 1 (no default value) (normally set to 1-100 straight integers appropriate)
Org.quartz.threadPool.threadCount = 25
# Set the priority of the thread (up to Java.lang.Thread.MAX_PRIORITY 10, Min. thread.min_priority 1, default = 5)
Org.quartz.threadPool.threadPriority = 5
#------------------Set some properties of Simplethreadpool-------------------------------
# Set whether to be a daemon thread
#org. Quartz.threadpool.makethreadsdaemons = False
#org. quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread:true
#org. Quartz.threadpool.threadsinheritgroupofinitializingthread=false
#线程前缀默认值是: [Scheduler Name]_worker
#org. Quartz.threadpool.threadnameprefix=swhjobthead;
#------------------------Configure global Listening (Triggerlistener,joblistener) the application can receive and execute scheduled event notifications
# Configuring a global Triggerlistener configures the trigger listener globally.
# Mytriggerlistenerclass class must have a parameterless constructor, and a set method of the property, currently 2.2.x only supports values of the original data type (including strings)
#org. Quartz.triggerListener.NAME.class = Com.swh.MyTriggerListenerClass
#org. Quartz.triggerListener.NAME.propName = PropValue
#org. Quartz.triggerListener.NAME.prop2Name = Prop2value
# Configuring a global Joblistener Configure the job listener globally
# Myjoblistenerclass class must have a parameterless constructor, and a set method of the property, currently 2.2.x only supports values of the original data type (including strings)
#org. Quartz.jobListener.NAME.class = Com.swh.MyJobListenerClass
#org. Quartz.jobListener.NAME.propName = PropValue
#org. Quartz.jobListener.NAME.prop2Name = Prop2value
#============================================================================
# Configure jobstore How to configure Data storage
#============================================================================
# The number of milliseconds that the scheduler can tolerate before a trigger is identified as "misfired" (the default value for information save time is 60 seconds )
Org.quartz.jobStore.misfireThreshold = 60000
# All quartz data such as job and trigger details are stored in memory or database (Ramjobstore, Jdbcjobstore)
Org.quartz.jobStore.class = Org.quartz.simpl.JDBCJobStore
# Configure transactions. Jobstoretx to let Quartz help you manage your business (Java EE application Server transaction JOBSTORECMT)
Org.quartz.jobStore.class = Org.quartz.impl.jdbcjobstore.JobStoreTX
# Driverdelegate is responsible for all JDBC work on the specified database, and if the database has no other proxy specified, try the agent Stdjdbcdelegate
Org.quartz.jobStore.driverDelegateClass = Org.quartz.impl.jdbcjobstore.StdJDBCDelegate
# to indicate that all of the values in the Jobdatamaps are strings and can be stored in the Blob field as a "name-value" pair rather than as a serialized form of a complex object, it should be set to True (default) Jdbcjobstore
Org.quartz.jobStore.useProperties = False
# Configure the name of the data source to use when configuring the data source later, for example org.quartz.dataSource.clusterDS.driver = Com.mysql.jdbc.Driver
Org.quartz.jobStore.dataSource = Clusterds
# data Table Prefix
Org.quartz.jobStore.tablePrefix = Qrtz_
# whether clustering, load balancing, fault tolerance
Org.quartz.jobStore.isClustered = True
# the frequency (in milliseconds) that is checked into the database. Check if other instances are not checked in when they should be checked in. This can indicate a failed instance, and the current scheduler will take over the failed and recoverable job
# by check-in operation, Scheduler also updates its own status record
org.quartz.jobstore.clustercheckininterval = 20000
org.quartz.jobstore.acquiretriggerswithinlock = True
#org. Quartz.jobStore.maxMisfiresToHandleAtATime =
#============================================================================
Configure datasources data source
#============================================================================
# database-Driven
Org.quartz.dataSource.clusterDS.driver = Com.mysql.jdbc.Driver
# Database Connection Address
Org.quartz.dataSource.clusterDS.URL = jdbc:mysql://${mysql.address}/etc-quartz?useunicode=true& Characterencoding=utf8
# Database User Name
Org.quartz.dataSource.clusterDS.user = ${mysql.user}
# Database Password
Org.quartz.dataSource.clusterDS.password = ${mysql.password}
# database maximum number of connections (if scheduler is busy, such as the number of tasks performed is approximately the same as the thread pool, then the number of connections required to configure DataSource is the number of thread pools + 1)
Org.quartz.dataSource.clusterDS.maxConnections = 30
#
Org.quartz.datasource.clusterds.validationquery=select RAND ()
#============================================================================
# Configure Plugins plugin configuration
#============================================================================
# Configure trigger Execution history log (you can see the document and parameter list of the class)
Org.quartz.plugin.triggHistory.class = Org.quartz.plugins.history.LoggingJobHistoryPlugin
Org.quartz.plugin.triggHistory.triggerFiredMessage = Trigger {1}. {0} fired job {6}. {5} at: {4, date, HH:mm:ss mm/dd/yyyy}
Org.quartz.plugin.triggHistory.triggerCompleteMessage = Trigger {1}. {0} completed firing job {6}. {5} at {4, date, HH:mm:ss mm/dd/yyyy} with resulting trigger instruction code: {9}
# classes that load Job and Trigger information (before 1.8 by: Org.quartz.plugins.xml.JobInitializationPlugin)
#org. Quartz.plugin.jobInitializer.class = Org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin
# Specifies the XML file that holds the scheduler (JOB and Trigger) information, which by default is Classpath Quartz_jobs.xml
#org. Quartz.plugin.jobInitializer.fileNames = Quartz_data.xml
#org. Quartz.plugin.jobInitializer.failOnFileNotFound = True
#
#org. Quartz.plugin.jobInitializer.overWriteExistingJobs = True
# automatically scans the task order and discovers the time interval of the change, in seconds
Org.quartz.plugin.jobInitializer.scanInterval = 120
# Overwrite the Jobdetail in the Task Scheduler with the same name, and avoid modifying only the cronexpression caused by the failed re-entry
Org.quartz.plugin.jobInitializer.wrapInUserTransaction = False
# ===========================================================================
# sample config of Shutdownhookplugin shutdownhookplugin plug-in configuration example
# ===========================================================================
#org. Quartz.plugin.shutdownhook.class = \org.quartz.plugins.management.shutdownhookplugin
#org. Quartz.plugin.shutdownhook.cleanShutdown = True
# Configure RMI Settings remote Service invocation configuration
# If you want to quartz-scheduler the exit itself through RMI as the server, then set the "Egress" flag true (the default value is False).
#org. Quartz.scheduler.rmi.export = False
# Host on RMI registry (default localhost)
#org. quartz.scheduler.rmi.registryhost = localhost
# Register the Listening port number (default 1099)
#org. Quartz.scheduler.rmi.registryport = 1099
# Create RMI Registration, False/never: If you already have a run or do not want to create a registration
# true/as_needed: First attempt to use an existing registration and then come back to create
# always: Create a registration first and then use it back to use the registration
#org. Quartz.scheduler.rmi.createregistry = Never
#Quartz Scheduler server port, by default the RMI registry is randomly assigned
#org. Quartz.scheduler.rmi.serverport = 1098
# true: Link remote service dispatch (client), this also specify Registryhost and Registryport, default to False
# If both export and proxy are specified as true, the export setting is ignored
# ===========================================================================# Configuring a Global TriggerListener Configuring the Global Trigger Listener # Mytriggerlistenerclass class must have a parameterless constructor, and a set method of the property, currently 2.2.x only supports values of the original data type (including strings) # ===================== ====================================================== #org. Quartz.triggerListener.NAME.class = Com.swh.mytriggerlistenerclass#org.quartz.triggerlistener.name.propname = propvalue# Org.quartz.triggerListener.NAME.prop2Name = prop2value# ========================================================= ==================# Configuring a global Joblistener Configuring the Job Listener # Myjoblistenerclass class must have a parameterless constructor, and a set method of the property, Currently 2.2.x only supports values of raw data types (including strings) # ===========================================================================# Org.quartz.jobListener.NAME.class = Com.swh.myjoblistenerclass#org.quartz.joblistener.name.propname = propvalue# Org.quartz.jobListener.NAME.prop2Name = Prop2value--------------------- sanfye source:csdn Original:49204307?utm_source=copy Copyright notice: This article for Bo Master original article, reproducedPlease attach the post link!
Detailed configuration quartz configuration file