|
Re: Fire Events Periodically ?? [message #123568 is a reply to message #123555] |
Wed, 31 December 2008 20:28 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 #123615 is a reply to message #123602] |
Fri, 02 January 2009 15:44 |
Eclipse User |
|
|
|
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
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04640 seconds