views:

374

answers:

4

Hi, I am using quartz to schedule my jobs, I need to execute a job at 2:00am every day and repeat the execution 5 times every 10 minutes, any ideas? the result should be: 2:00 2:10 2:20 2:30 2:40

Thanks in advance.

+1  A: 

I would look at the Quartz CronTrigger, and particularly the usage of / to specify every 'n' minutes/hours whatever.

I think you would need

0 0,10,20,30,40 2 * * ?

to fire at 2am and then 2.10am-2.40am every 10 minutes.

Brian Agnew
A: 

Just specify the schedule times as a cron string for the CronTrigger like this:

0 0,10,20,30,40 2 * * *
Heiko Rupp
A: 

A simple solution would be to simply have 5 tasks, one for every 10 minutes.

takete.dk
A: 

Use a CronTrigger with a cron expression that describes the exact times you want it run. For every day at 2:00, 2:10, 2:20, 2:30, 2:40, use:

0 0,10,20,30,40 2 * * ?
Avi
thanks, im new in quartz and I never used Cron Trigger, I will try it