Re: scheduler service
Michael Nash <[email protected]> Sun, 08 Aug 2004 18:22:01 -0400
| Newsgroups | gmane.comp.java.keel.user |
|---|---|
| Organization | JGlobal Limited |
| Message-ID | <[email protected]> |
Lou:
>From the below, it certainly looks like you're calling the Scheduler
correctly....
I'm using Scheduler on a project right now, so I've just recently run
it's unit test suite, and it passed - but let me do a couple of
practical tests and see what I'm getting here.
Mike
On Fri, 2004-08-06 at 17:14, Louis Moore wrote:
> I'm trying to use the quartz scheduler service to schedule a model. It
> seems from the documentation to be pretty straightforward, but I haven't
> been able to get it to work. The logs show that the job has been
> scheduled correctly and the next run time is correct:
>
> INFO 2004-08-06 14:05:51.051 [svc-schedule-quartz]
> (/org.keel.services.schedule.quartz.QuartzScheduler.scheduleCronJob(Quar
> tzScheduler.java:214)): Scheduling Quartz job job-1 in group DEFAULT
> INFO 2004-08-06 14:05:51.051 [svc-schedule-quartz]
> (/org.keel.services.schedule.quartz.QuartzScheduler.scheduleCronJob(Quar
> tzScheduler.java:249)): Scheduled Quartz job job-1, next:Fri Aug 06
> 14:06:00 PDT 2004, model:scheduler.refreshremedy-job, cron: 0 0/3 * * *
> ? *
>
> But when that time comes, nothing happens at all. No error messages,
> nothing in the logs, no execution of the job. I'm hoping I'm missing
> something obvious that somebody can point out. Here's the model I'm
> trying to execute, which is basically just taken from one of the quartz
> service test classes. Is something wrong here?:
>
> /**
> * @avalon.component
> * @avalon.service type=org.keel.services.model.Model
> * @x-avalon.info name=scheduler.refreshremedy-job
> * @x-avalon.lifestyle type=singleton
> */
> public class RefreshRemedyJob extends StandardLogEnabledModel
> implements Schedulable{
>
> public ModelResponse execute(ModelRequest req) throws
> ModelException {
>
> ModelResponse res = req.createResponse();
> log.info("Calling execute() method for Schedulable
> interface");
> this.execute();
> return res;
> }
>
> public void execute(){
>
> log.info("Begin execution of model batch job");
> //Business logic goes here....
> log.info("Finished running model batch job");
> }
> }
>
> Thanks,
> Lou
>
> _______________________________________________
> User mailing list
> [email protected]
> http://lists.keelframework.org/listinfo.cgi/user-keelframework.org