Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Immediate one time task with Quartz

I am using a Quartz to build a clustered ThreadPool and I have number of tasks that run at various times. What is the best way to run 1 task immanently and only once on the clustered ThreadPool. I know I can set the task to a high priority. But what is the best way to register a "one shot" task?

like image 959
rook Avatar asked Oct 31 '10 23:10

rook


1 Answers

I feel like I must be missing something, or maybe you just overlooked this bit in the docs:

public SimpleTrigger(String name, String group, Date startTime, Date endTime, int repeatCount, long repeatInterval)


SimpleTrigger trigger = new SimpleTrigger("myTrigger",
                                            null,
                                            new Date(),
                                            null,
                                            0,
                                            0L);
like image 162
Brad Mace Avatar answered Oct 21 '22 19:10

Brad Mace