Reputation: 18639
I'm lost In quartz 2.0 definition. I would like to schedule SimpleTrigger
which will
will happen at 5pm.
Date start = 12/20/2012;
Date endDate = 12/31/2017;
SimpleTrigger trigger = newTrigger()
.withIdentity("trigger3", "group1")
.startAt(startDate)
.withSchedule(simpleSchedule()
.withIntervalInHours(3 * 24)
.build();
How can I add 5pm occurrence and endDate
parameters to TriggerBuilder
?
Upvotes: 0
Views: 608
Reputation: 1037
Try this:
Date start = 12/20/2012;
Date endDate = 12/31/2017;
SimpleTrigger trigger = newTrigger()
.withIdentity("trigger3", "group1")
.startAt(startDate)
.withSchedule(cronSchedule("* * 17 0/3 * *").build())
.endAt(endDate)
.build;
I haven't tested this myself, but this should work or might at least need some tweaks.
Upvotes: 3