You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by bane73 <br...@thegreshams.net> on 2014/08/13 20:43:58 UTC

Scheduler status?

I've tried following the older threads about the status of doing scheduling
in Karaf but it's not clear to me...

Is there support in Karaf for doing scheduling?  
If so, how?
If not, what is the suggested way I should be doing it right now?

This is like the LAST piece of the puzzle for my first OSGI project here at
the University of Utah.  I get this figured out and I can go live with what
may be the first OSGI project at the U.







--
View this message in context: http://karaf.922171.n3.nabble.com/Scheduler-status-tp4034750.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Scheduler status?

Posted by bane73 <br...@thegreshams.net>.
I really appreciate everyone's responses.  Thanks so much!

"Some day..." I may need more power in my scheduler.  But, for now, I only
need the most basic scheduling.  I just need to fire a task every x-period. 
I don't need to dynamically change it (yet) or be overly-concerned if it
fails (yet), or anything else (yet).

So, for now, since there's not really a Karaf-standard yet, I've settled
into using vanilla java executors (scheduleWithFixedDelay).  The beautiful
thing about Karaf is I can update the interval pretty easily by stopping the
bundle, updating the system-property, and starting the bundle back up. 

The different opinions were very interesting to read.  Thanks again.



--
View this message in context: http://karaf.922171.n3.nabble.com/Scheduler-status-tp4034750p4034794.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Scheduler status?

Posted by Achim Nierbeck <bc...@googlemail.com>.
Actually with Karaf 3, there is a scheduler service available.
To use it you need to register a service with the Runnable Interface and
two properties:

org.apache.karaf.scheduler.task.id

org.apache.karaf.scheduler.task.period

It's a simple scheduler, and somewhere in the past it has been decided not
to document it till there is a real use-case for a Karaf embedded
scheduler. Seems like you got one ;)

So here you go :)

regards, Achim


2014-08-14 22:37 GMT+02:00 Kevin Carr <ks...@gmail.com>:

> I have a scheduler that I created that I am putting on github.  I will see
> about doing that tonight.   I am us central timezone
> On Aug 14, 2014 3:36 PM, "Tim Jones" <ti...@mccarthy.co.nz> wrote:
>
>> I am not aware of any Karaf specific offerings or anything specific about
>> scheduling jobs in the OSGI specs.
>>
>> I don't know what is the 'suggested way' but we use Quartz (v 2.1.6) to
>> schedule jobs in our Felix/Karaf application (FYI -  the Apache Sling
>> project which is OSGI based also uses Quartz). There are a few other
>> scheduler offerings that would probably work just as well.
>>
>>
>>
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/Scheduler-status-tp4034750p4034778.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>

Software Architect / Project Manager / Scrum Master

Re: Scheduler status?

Posted by Kevin Carr <ks...@gmail.com>.
I have a scheduler that I created that I am putting on github.  I will see
about doing that tonight.   I am us central timezone
On Aug 14, 2014 3:36 PM, "Tim Jones" <ti...@mccarthy.co.nz> wrote:

> I am not aware of any Karaf specific offerings or anything specific about
> scheduling jobs in the OSGI specs.
>
> I don't know what is the 'suggested way' but we use Quartz (v 2.1.6) to
> schedule jobs in our Felix/Karaf application (FYI -  the Apache Sling
> project which is OSGI based also uses Quartz). There are a few other
> scheduler offerings that would probably work just as well.
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Scheduler-status-tp4034750p4034778.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

Re: Scheduler status?

Posted by Tim Jones <ti...@mccarthy.co.nz>.
I am not aware of any Karaf specific offerings or anything specific about
scheduling jobs in the OSGI specs. 

I don't know what is the 'suggested way' but we use Quartz (v 2.1.6) to
schedule jobs in our Felix/Karaf application (FYI -  the Apache Sling
project which is OSGI based also uses Quartz). There are a few other
scheduler offerings that would probably work just as well.



--
View this message in context: http://karaf.922171.n3.nabble.com/Scheduler-status-tp4034750p4034778.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Scheduler status?

Posted by Tim Jones <ti...@mccarthy.co.nz>.
Brandon, before you go to far down the track it might be best to access what
capabilities you need for your scheduler. For example Quartz offers the
ability to 

- trigger jobs (via simple/cron triggers)

    at a certain time of day (to the millisecond)
    on certain days of the week
    on certain days of the month
    on certain days of the year
    not on certain days listed within a registered Calendar (such as
business holidays)
    repeated a specific number of times
    repeated until a specific time/date
    repeated indefinitely
    repeated with a delay interval

- persistent job store to survive server crashes

- associate listeners to job start/stop events etc

- the behaviour of miss fire events (e.g. server down when a job is
scheduled to run) can be altered






--
View this message in context: http://karaf.922171.n3.nabble.com/Scheduler-status-tp4034750p4034783.html
Sent from the Karaf - User mailing list archive at Nabble.com.