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.
From stackoverflow
-
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.
-
Just specify the schedule times as a cron string for the CronTrigger like this:
0 0,10,20,30,40 2 * * *
-
A simple solution would be to simply have 5 tasks, one for every 10 minutes.
-
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 * * ?
0 comments:
Post a Comment