job scheduler with quartz [message #714056] |
Tue, 09 August 2011 13:40  |
Eclipse User |
|
|
|
Is there a way to use quartz scheduler with scout? I am testing scout with a existing web application which has some quartz schedule jobs. I would like to reuse those existing quartz jobs.
|
|
|
Re: job scheduler with quartz [message #719182 is a reply to message #714056] |
Fri, 26 August 2011 05:08   |
Eclipse User |
|
|
|
Scout provides a Scheduler which provides the execution of periodically
execution of jobs. To get there add the following lines to your
ServerApplication.start method:
Scheduler scheduler = new
Scheduler(Activator.getDefault().getBackendSubject(),
ServerSession.class, new Ticker(Calendar.SECOND));
scheduler.addJob(new AbstractSchedulerJob("anyGroupId", "aJobId") {
@Override
protected boolean execAcceptTick(TickSignal signal, int second,
int minute, int hour, int day, int week, int month, int year, int
dayOfWeek, int dayOfMonthReverse, int dayOfYear, int secondOfDay) {
return second % 10 == 0;
}
@Override
public void run(IScheduler scheduler, TickSignal signal) throws
ProcessingException {
System.out.println("executed job... " + signal.getMinute() +
"-" + signal.getSecond());
}
});
scheduler.start();
Activator.getDefault().setScheduler(scheduler);
To add SchedulerJobs from anywhere use
Activator.getDefault().getScheduler().addJob(...).
Does the scheduler fit your needs?
-Andreas
On 09.08.2011 19:40, irheat wrote:
> Is there a way to use quartz scheduler with scout? I am testing scout
> with a existing web application which has some quartz schedule jobs. I
> would like to reuse those existing quartz jobs.
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: job scheduler with quartz [message #720964 is a reply to message #720787] |
Wed, 31 August 2011 11:15  |
Eclipse User |
|
|
|
Thanks Andreas, it works great, now I have a similar interface for both swing and swt. The snapbox works also, but it is a bit small and located at the button, I think it is better to have a action button in the toolbar doing the outline change just like the swing interface.
|
|
|
Powered by
FUDForum. Page generated in 0.30861 seconds