2 whb3299065 whb3299065 于 2017.09.19 18:42 提问

quartz在window上可以运行,但发布到Linux后不能运行

[org.quartz.impl.StdSchedulerFactory] - Using default implementation for ThreadExecutor
[org.quartz.core.SchedulerSignalerImpl] - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
[org.quartz.core.QuartzScheduler] - Quartz Scheduler v.2.3.0 created.
[org.quartz.simpl.RAMJobStore] - RAMJobStore initialized.
[org.quartz.core.QuartzScheduler] - Scheduler meta-data: Quartz Scheduler (v2.3.0) 'org.springframework.scheduling.quartz.SchedulerFactoryBean#0' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.

[org.quartz.impl.StdSchedulerFactory] - Quartz scheduler 'org.springframework.scheduling.quartz.SchedulerFactoryBean#0' initialized from an externally provided properties instance.
[org.quartz.impl.StdSchedulerFactory] - Quartz scheduler version: 2.3.0
[org.quartz.core.QuartzScheduler] - JobFactory set to: org.springframework.scheduling.quartz.AdaptableJobFactory@45092990
quartz在window上可以运行但部署到服务器后不能运行



<bean id="myOrderCheck"  
    class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">  
    <property name="targetObject" ref="orderCheckQuartz" />  
    <property name="targetMethod" value="checkJob" />  
    <property name="concurrent" value="false" />  
</bean>  

<bean id="myOrderCheckTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">  
    <property name="jobDetail" ref="myOrderCheck" />  
    <property name="cronExpression">  
        <value>0 20 18 * * ?<alue>  
    </property>  
</bean>  

class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">







<bean id="myDepOrderCheckTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">  
    <property name="jobDetail" ref="myDepOrderCheck" />  
    <property name="cronExpression">  
        <value>0 0 6 * * ?<alue>  
    </property>  
</bean>  



<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">  
    <property name="triggers">  
        <list>  
            <ref local="myOrderCheckTrigger" />  
            <ref local="myDepOrderCheckTrigger" />     
        <st>  
    </property>  
</bean>   

4个回答

devmiao
devmiao   Ds   Rxr 2017.09.19 23:52
已采纳
theUncle
theUncle   Rxr 2017.09.20 09:17

部署的时候日志有提示错误吗?

whb3299065
whb3299065 没有提示错误
大约 2 个月之前 回复
whb3299065
whb3299065   2017.09.20 09:23

的确是权限问题,后来将tomcat下的文件全部改为777权限后可以运行了

whb3299065
whb3299065   2017.09.20 09:38

后来发现,不光是权限问题,应为这个服务是部署在日本的服务器上,应为时差问题

Csdn user default icon
上传中...
上传图片
插入图片