如何在一个简单的 Java 应用程序中设置一个quartz.config 文件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4805350/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 08:06:04  来源:igfitidea点击:

How to setup a quartz.config file in a simple Java application?

javaquartz-scheduler

提问by Michael W

How can I setup a quartz.configfile in a simple Java application?

如何quartz.config在简单的 Java 应用程序中设置文件?

I want to create this and reference it in my project so I can configure threads etc.

我想创建它并在我的项目中引用它,以便我可以配置线程等。

Thanks

谢谢

回答by dogbane

Take a look at the Quartz Quick Start Guideto see what a basic quartz.propertiesfile looks like. This file must be placed on your classpath, for Quartz to use it. Example:

查看Quartz 快速入门指南,了解基本quartz.properties文件的外观。这个文件必须放在你的类路径中,以便 Quartz 使用它。例子:

org.quartz.scheduler.instanceName = MyScheduler
org.quartz.scheduler.instanceId = 1
org.quartz.scheduler.rmi.export = false
org.quartz.scheduler.rmi.proxy = false

org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 3

org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore

Full documentation of available properties is available in the Quartz Configuration Reference.

Quartz 配置参考中提供了可用属性的完整文档。