views:

27

answers:

1

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?

+2  A: 

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);
bemace