java - Scheduling with quartz every minute from 14:00 to 17:30 -


i having problems scheduling job quartz... cannot find expression lets me run job 14:00 17:30 every minute... have tried this

0 0-30/1 14-17 ? * mon-fri 

but not works

in spring way

@scheduled(cron="0 0 14-16 * * *") public void schedule1() {     schedule2(); }  @scheduled(cron="0 0-30 17 * * *") public void schedule2() {     system.out.println(new date()); } 

or in xml config

<bean id="test" class="test.test" />  <task:scheduled-tasks>     <task:scheduled ref="test" method="schedule2" cron="0 0 14-16 * * *"/>     <task:scheduled ref="test" method="schedule2" cron="0 0-30 17 * * *"/> </task:scheduled-tasks> 

note in xml config can use 1 method. trick annotations because cannot use 2 annotations of same type on 1 method.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -