Announcement Announcement Module
Collapse
No announcement yet.
Spring batch not working on windows 2008 server Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring batch not working on windows 2008 server

    Hi,

    I have written a spring scheduler which is supposed to get triggered at 1 PM server time, the configuration works fine on my location development machine,

    Code:
    <bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean" lazy-init="false">
    	   <property name="triggers">
    	   		<list>
    				<ref bean="trigger" /> 	
    			</list>
    	   </property>    
    	</bean>
    	
    	<bean id="trigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
    	  <property name="jobDetail" ref="doJob" />
    	  <property name="cronExpression" value="0 0 13 * * ?" />
    	</bean>
    
    	<bean id="doJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
    	  <property name="targetObject" ref="jobManager" />
    	  <property name="targetMethod" value="executeJobs" />
    	</bean>
    	
    	<bean id="jobManager" class="com.inrev.tracker.manager.impl.IRJobManagerImpl" depends-on="userDAO">
    		<property name="userDAO" ref="userDAO" />
    		<property name="frendFollow" ref="frendFollow" />
    		<property name="searchUtil" ref="searchUtil" />
    		<property name="tweetDAO" ref="tweetDAO" />
    	</bean>
    But, the same job doesn't get triggered on the server, what can be the problem. I tried triggering the job every 5 mins, using the following configuration on the server and it worked fine, but the job refuses to trigger at specific times,

    Code:
    <bean id="trigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
    	  <property name="jobDetail" ref="doJob" />
    	  <property name="cronExpression" value="0 0/5 * * * ?" />
    	</bean>

  • #2
    Did you tried */5 instead of 0/5?

    Comment


    • #3
      Have you checked out what time/timezone the server is running on? We typically configure our servers to run in UTC so if you schedule a job to run at 5pm it will run at 5pm UTC not 5pm in your local timezone. This can cause some confusion.

      Comment


      • #4
        this is minutes position not hours, expresion should work,
        What do you mean "job refuses trigger"?
        Do you have any exception?

        Comment

        Working...
        X