Hi Ioannis,

It's a really good idea (we discussed of that for Cellar :)).

It could be very helpful for a large set of requirements.

I wonder:
1/ should it be a standard feature or an optional one (I think standard is better as it doesn't require any resource if not used. It could be comparable to the Scheduler that we find in an Oracle database). 2/ as for security/encryption (which use a simple encryption class or Jasypt), maybe it could be interesting a use a simple scheduler (just a Java Timer) and provide an optional feature to provide advanced scheduling (cron, etc) which can be powered by Quartz 3/ add commands and console pages is a requirement. We can imagine projects that could use Karaf as an enterprise scheduler (with team escalation, etc).

Thanks
Regards
JB

On 07/20/2011 02:38 PM, Ioannis Canellos wrote:
Hi,

I added a new module to Karaf. The purpose of this module is to provide
means for scheduling tasks through the osgi service registry.

The scheduler module registers a ServiceListener that listens for services
of the java.lang.Runnable interface that also have 2 service properties that
are required for scheduling:

a) org.apache.karaf.scheduler.task.id (A string identifier for the task that
is going to be scheduled).
b) org.apache.karaf.scheduler.task.period (A long number that indicates the
execution period in milliseconds).

Please note that all Runnable that don't have both properties will be
ignored. All other will be scheduled for execution via java Timer.

I also plan to add shell commands for listing, rescheduling
&  canceling events. It might be a goog idea to also add properties for
supporting cron expression etc.

You can find the initial commit in the trunk.

wdyt?

--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to