After spending some time trying to create a light interface
to Quartz I gave up and wrote a new scheduler package, as I had
originally planned. That was several weeks ago.
The project I am working on at the moment finishes in two
weeks, and I expect to finish this package immediately after
that.
I would appreciate if anyone would care to look and comment:
http://www.ivanristic.com/chronos/
It is very light and supports most of the requirements I sent
in an email earlier. It contains two scheduler implementations:
DefaultScheduler - non-persistent tasks executed at a
regular rate (+ start date, end date, repeat count)
CronScheduler - persistent cronlike tasks (but since it
inherits from the DefaultScheduler it supports
non-persistent tasks too).
Schedulers accept Runnable instances and execute them. Wrappers
are used to achieve other execution methods such as object method
call, class method call, Spring event fired, Spring bean method
call, etc.
A typical usage would look like this:
CronScheduler scheduler = new CronScheduler();
scheduler.start();
scheduler.createTask("*/2 * * * * bsh.Interpreter.source test.bsh");
Schedule schedule = new RecurringSchedule();
schedule.setRate(10000);
schedule.setRepeatCount(7);
scheduler.createTask(new SomeJob(), schedule);
Comments related to Spring integration are especially welcome. I've
done most of the work. What remains to be done is: final debugging,
tests, and implementation of several helper classes in a subpackage
to use other means of execution (native, HTTP, probably only ones
that can be done without introducing library dependencies).
I am also considering creating a MBean (more likely as my app will
be JMX based) and an EJB interface (less likely).
--
ModSecurity (http://www.modsecurity.org)
[ Open source IDS for Web applications ]
|