• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Quartz Cron Expression Help

 
Kerry Wilson
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need my job to run every day at 6 AM. This expression is not working though I suspect that it is running on sundays.

<bean id="documentNotificationTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail" ref="documentNotificationJob" />
<!-- run at 6 in the morning -->
<property name="cronExpression" value="0 0 6 * * ?" />
</bean>
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The expression looks fine. How are you using this trigger ?
 
Kerry Wilson
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply, it did indeed run Sunday at 6 AM, here is the relevant spring configuration xml.



Thats some verbose stuff to get a cron to run, but I love the fact that I can tie it all in one neat package for deployment.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the SchedulerFactoryBean always running in the background ?
 
Kerry Wilson
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess so, it must setup all the scheduling when it is initialized.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic