Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Fire Events Periodically ??
Fire Events Periodically ?? [message #123555] Wed, 31 December 2008 15:11 Go to next message
Walter Mising name is currently offline Walter Mising nameFriend
Messages: 128
Registered: July 2009
Senior Member
Hi,

my application needs to kick off event at regular intervals ( say daily or
weekly ).. is there any way to
do this?

-Walter.
Re: Fire Events Periodically ?? [message #123568 is a reply to message #123555] Wed, 31 December 2008 20:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

On 12/31/2008 10:11 AM, Walter Prabhakar wrote:
> Hi,
>
> my application needs to kick off event at regular intervals ( say daily
> or weekly ).. is there any way to
> do this?

The EPP project's Usage Data Collector
(http://www.eclipse.org/epp/usagedata/) does something like that; it
periodically uploads usage data on a user-configured schedule.
There are links to view or get the source code on that web page, and the
newsgroup to ask questions about it is eclipse.technology.packaging
(where EPP questions, in general, belong).

If that does not provide any help, I'd take a look at the Quartz
framework: http://www.opensymphony.com/quartz/ - I've used that several
times, though not in an Eclipse plugin or RCP app.

Hope this helps,
Eric
Re: Fire Events Periodically ?? [message #123591 is a reply to message #123555] Thu, 01 January 2009 19:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fakemail.xyz.de

Walter Prabhakar schrieb:
> Hi,
>
> my application needs to kick off event at regular intervals ( say daily
> or weekly ).. is there any way to
> do this?
>
> -Walter.

With a few lines of code you can do it yourself...

Use a preference value to store the last kick off..

Use a ScheduledExecutorService on start of your Application to schedule
the next kick off...


Christian
Re: Fire Events Periodically ?? [message #123602 is a reply to message #123591] Fri, 02 January 2009 12:24 Go to previous messageGo to next message
Gunnar Wagenknecht is currently offline Gunnar WagenknechtFriend
Messages: 486
Registered: July 2009
Location: San Francisco ✈ Germany
Senior Member

Christian schrieb:
> Use a ScheduledExecutorService on start of your Application to schedule
> the next kick off...

Or better, use the Jobs API. It allows to schedule a job to start in the
future.

-Gunnar


--
Gunnar Wagenknecht
gunnar@wagenknecht.org
http://wagenknecht.org/
Re: Fire Events Periodically ?? [message #123615 is a reply to message #123602] Fri, 02 January 2009 15:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fakemail.xyz.de

Gunnar Wagenknecht schrieb:
> Christian schrieb:
>> Use a ScheduledExecutorService on start of your Application to schedule
>> the next kick off...
>
> Or better, use the Jobs API. It allows to schedule a job to start in the
> future.
>
> -Gunnar
>
>

So does the ScheduledExecutorService.
I have found Jobs to be nice if you need to show progress in the GUI
(and cancelling). Or if you depend on resources to be locked.

Though for simple stuff Jobs api is often Overkill and creating a
ScheduledExecutorService for the app will be easier.


Might be a matter of preference. Usually when I need some functionality
and the stdlib provides an equally good solution I would choose the java
stdlib over other api.

Christian
Re: Fire Events Periodically ?? [message #123628 is a reply to message #123555] Fri, 02 January 2009 19:30 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Walter,

The Timer and TimerTask classes in java.util are also quite interesting.

Cheers
/Eike

----
http://thegordian.blogspot.com



Walter Prabhakar schrieb:
> Hi,
>
> my application needs to kick off event at regular intervals ( say
> daily or weekly ).. is there any way to
> do this?
>
> -Walter.


Re: Fire Events Periodically ?? [message #124194 is a reply to message #123628] Sat, 10 January 2009 14:57 Go to previous message
Walter Mising name is currently offline Walter Mising nameFriend
Messages: 128
Registered: July 2009
Senior Member
Thanks. it works.
- Walter
"Eike Stepper" <stepper@esc-net.de> wrote in message
news:gjlq0s$a4h$1@build.eclipse.org...
> Walter,
>
> The Timer and TimerTask classes in java.util are also quite interesting.
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
>
>
>
> Walter Prabhakar schrieb:
>> Hi,
>>
>> my application needs to kick off event at regular intervals ( say daily
>> or weekly ).. is there any way to
>> do this?
>>
>> -Walter.
Previous Topic:Equinox Transforms
Next Topic:Eclipse with P2
Goto Forum:
  


Current Time: Tue Mar 19 11:20:12 GMT 2024

Powered by FUDForum. Page generated in 0.02940 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top