I've put together a simple scheduler service and I'd like to get some input from the group. First, I'm currently using an external scheduler class from http://www.bitmechanic.com (see com.bitmechanic.util.Schedule). It has a GNU license. (Why re-invent?) Does anyone have any objections to this? Here's the approach I've taken with it: You create a scheduled job with an action like this: public class SampleScheduledJob extends Action implements Runnable { public void build( RunData data ) throws Exception { /* Could check here if you have the permission to start a Job */ com.bitmechanic.util.Scheduler schedule = TurbineScheduler.getInstance().getScheduler(); /* Will run every five minutes */ schedule.scheduleJob(this,300); System.out.println("Started scheduled JOB!"); } public void run() { System.out.println("Executed scheduled JOB!"); } } The singleton TurbineScheduler starts the scheduler (thread). The scheduler class maintains a queue of jobs sorted by run time. Is this what you had in mind for a schedule service? Dave ------------------------------------------------------------ To subscribe: [EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] Problems?: [EMAIL PROTECTED]
