Quartz如何取消检查更新
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Quartz如何取消检查更新相关的知识,希望对你有一定的参考价值。
用quartz做作业调度时,每次都要检查更新,这一检查就是一分多钟,就卡在这了,控制台里显示
Checking for available updated version of Quartz...
在jar包的这个class里,org.quartz.utils.UpdateChecker
请问怎么取消它?
<!-- 定时任务 -->
<bean id="z" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list></list>
</property>
<property name="quartzProperties">
<props>
<!-- 主要是这个参数 -->
<prop key="org.quartz.scheduler.skipUpdateCheck">true</prop>
</props>
</property>
</bean>
或者启动参数
-Dorg.terracotta.quartz.skipUpdateCheck=true
或者启动的类中添加
System.setProperty("org.terracotta.quartz.skipUpdateCheck","true");
如果这个管用了 点个给力 省的别人总去看那个没用的网友采纳 参考技术A
在tomcat/bin 目录下的catalina.sh下加入
JAVA_OPTS="$JAVA_OPTS -Dorg.terracotta.quartz.skipUpdateCheck=true"
这玩意好坑,我的centos服务器估计主机名配置不对,这个quartz检查更新直接导致启动时JVM崩溃:
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j java.net.Inet6AddressImpl.lookupAllHostAddr(Ljava/lang/String;)[Ljava/net/InetAddress;+0
...
...
j org.quartz.utils.UpdateChecker.run()V+1
j java.util.TimerThread.mainLoop()V+221
j java.util.TimerThread.run()V+1
v ~StubRoutines::call_stub
参考技术B Quartz contains an "update check" feature that connects to a server to checkif there is a new version of Quartz
available for download. This check runs asynchronously and does not affect
startup/initialization time of Quartz, and it fails gracefully if the
connection cannot be made. If the check runs, and an update is found, it will
be reported as available in Quartz's logs.
You can disable the update check with the Quartz config property
"org.quartz.scheduler.skipUpdateCheck: true" or
the system property "org.terracotta.quartz.skipUpdateCheck=true" (which you can
set in your system environment or as a -D on the java command line). It is
recommended that you disable the update check for production deployments. 参考技术C 更新失败,只需在applicationContext_quartz.xml其配置文件中设置下就可以了。
<!-- 设置触发器调度工厂 -->
<bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="cronTrigger"/>
<ref bean="otherTrigger"/>
<ref bean="threeTrigger"/>
<ref bean="fourTrigger"/>
<ref bean="fiveTrigger"/>
<ref bean="sixTrigger"/>
<ref bean="sevenTrigger"/>
<ref bean="eightTrigger"/>
<ref bean="nineTrigger"/>
<ref bean="tenTrigger"/>
<ref bean="elevenTrigger"/>
</list>
</property>
<property name="quartzProperties">
<props>
<!-- Quartz version update check failed:将这个检测更新给禁用掉 -->
<prop key="org.quartz.scheduler.skipUpdateCheck">true</prop>
</props>
</property>
<!--必须的设置 QuartzScheduler 延时启动,单位second,应用启动完后 QuartzScheduler 再启动 -->
<property name="startupDelay" value="40"></property><!-- Starting Quartz Scheduler now, after delay of 60 seconds -->
</bean>
<!-- 配置任务并发执行线程池 -->
<bean id="executor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
<property name="corePoolSize" value="3"/>
<property name="maxPoolSize" value="5"/>
<property name="queueCapacity" value="10"/>
</bean> 参考技术D 快三年了居然没人回答? 我也同求啊...真是个大坑
sublime text 3 安装插件和取消启动检查更新
1、Perferences->Package Contro,输入install 调出 Install Package 选项并回车
2、安装相应的插件
2、点击首选项–设置(用户)
3、卸载插件
下面就是列出的已经安装的插件,选中就可卸载
以上是关于Quartz如何取消检查更新的主要内容,如果未能解决你的问题,请参考以下文章