While we are on the subject, I seem to have a bug with how the TurbineNonPersistentSchedulerService.getJob(int oid) method works..
I checked the source in CVS for jakarta-turbine-2 and jakarta-turbine-fulcrum and this problem exists. JobEntry throws an exception in it's consturtor if the Task is null or "", but the TurbineNonPersistentSchedulerService.getJob creates a blank JobEntry with a null Task... Therefore you always get an exception. I happen to really like the TurbineNonPersistentSchedulerService service for my needs... It also appears some other improvements in fulcrum maybe could be backported.... Eric -----Original Message----- From: Jason van Zyl [mailto:[EMAIL PROTECTED]] Sent: Friday, December 28, 2001 3:34 PM To: Turbine Users List Subject: Re: One Time run of Scheduler Job? On 12/28/01 3:03 PM, "Pugh, Eric" <[EMAIL PROTECTED]> wrote: > David, > > I am trying to dig farther into some of the ideas that you have brought up.. > After looking at my code, I realized an issue... I want to have a Task be > run at a scheduled time. But I also want to run that same task on demand. How about we add a field that would allow the job to be disabled? We could than create an interface of RunOnceJobEntry and if a job implements this interface than: job.disable(); can be executed when the job is run, so maybe we need a post run hook to check this. Might be good to add pre run hook as well ... So that the job would only run once, and if you want to turn it back on than: job.enable(); And maybe cleanup the JobEntry interface so that you can simply: job.run(); For on demand usage, this would run the job but it would remain is a disabled state. I see that a few people are requesting this so I can whip something up if you guys want to finish it. -- jvz. Jason van Zyl http://tambora.zenplex.org http://jakarta.apache.org/turbine http://jakarta.apache.org/velocity http://jakarta.apache.org/alexandria http://jakarta.apache.org/commons -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
