wood burning stoves 2.0*
The moose likes Other Application Frameworks and the fly likes Quartz Cron Expression Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Quartz Cron Expression Help" Watch "Quartz Cron Expression Help" New topic
Author

Quartz Cron Expression Help

Kerry Wilson
Ranch Hand

Joined: Oct 29, 2003
Posts: 254
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>


http://www.goodercode.com
SCJP 1.4
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

The expression looks fine. How are you using this trigger ?


[My Blog]
All roads lead to JavaRanch
Kerry Wilson
Ranch Hand

Joined: Oct 29, 2003
Posts: 254
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

Joined: Nov 24, 2005
Posts: 14687
    
  16

Is the SchedulerFactoryBean always running in the background ?
Kerry Wilson
Ranch Hand

Joined: Oct 29, 2003
Posts: 254
I guess so, it must setup all the scheduling when it is initialized.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Quartz Cron Expression Help