You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by David Wynter <da...@btclick.com> on 2002/01/03 19:59:08 UTC

RE: One Time run of Scheduler Job?

Jason,

I need to do the enable, disable and run thing for JobEntry in the next few
days. Do you want to give me an interface or shall I just work from the
detail below?

Regards

David

-----Original Message-----
From: Jason van Zyl [mailto:jvanzyl@zenplex.com]
Sent: 28 December 2001 20:34
To: Turbine Users List
Subject: Re: One Time run of Scheduler Job?


On 12/28/01 3:03 PM, "Pugh, Eric" <EP...@MuseumCompany.com> 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:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: One Time run of Scheduler Job?

Posted by David Wynter <da...@btclick.com>.
Jason,

I can probably only add those methods as I have time constraints to solve a
problem with my application. While digging around thou I should be able to
at least put together some notes to help towards the creation of a XML or
properties file version.

David

-----Original Message-----
From: Jason van Zyl [mailto:jvanzyl@zenplex.com]
Sent: 03 January 2002 19:29
To: Turbine Users List
Subject: Re: One Time run of Scheduler Job?


On 1/3/02 2:14 PM, "David Wynter" <da...@btclick.com> wrote:

> Mine usage is of the database Scheduler. Good point, I had not thought of
> the file based version, I'll look into it tomorrow.

I was just thinking if we were going to start afresh that it would be easier
from an XML configuration or simple properties file.


--

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:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: One Time run of Scheduler Job?

Posted by Jason van Zyl <jv...@zenplex.com>.
On 1/3/02 2:14 PM, "David Wynter" <da...@btclick.com> wrote:

> Mine usage is of the database Scheduler. Good point, I had not thought of
> the file based version, I'll look into it tomorrow.

I was just thinking if we were going to start afresh that it would be easier
from an XML configuration or simple properties file.
 

-- 

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: One Time run of Scheduler Job?

Posted by David Wynter <da...@btclick.com>.
Mine usage is of the database Scheduler. Good point, I had not thought of
the file based version, I'll look into it tomorrow.

David

-----Original Message-----
From: Jason van Zyl [mailto:jvanzyl@zenplex.com]
Sent: 03 January 2002 19:05
To: Turbine Users List
Subject: Re: One Time run of Scheduler Job?


On 1/3/02 1:59 PM, "David Wynter" <da...@btclick.com> wrote:

> Jason,
>
> I need to do the enable, disable and run thing for JobEntry in the next
few
> days. Do you want to give me an interface or shall I just work from the
> detail below?

I'm not going to be able to do anything today, so start from what's below.
Do you need the jobs to be stored in a database or would some filebased
solution work for you?


> Regards
>
> David
>
> -----Original Message-----
> From: Jason van Zyl [mailto:jvanzyl@zenplex.com]
> Sent: 28 December 2001 20:34
> To: Turbine Users List
> Subject: Re: One Time run of Scheduler Job?
>
>
> On 12/28/01 3:03 PM, "Pugh, Eric" <EP...@MuseumCompany.com> 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:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>

--

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:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: One Time run of Scheduler Job?

Posted by Jason van Zyl <jv...@zenplex.com>.
On 1/3/02 1:59 PM, "David Wynter" <da...@btclick.com> wrote:

> Jason,
> 
> I need to do the enable, disable and run thing for JobEntry in the next few
> days. Do you want to give me an interface or shall I just work from the
> detail below?

I'm not going to be able to do anything today, so start from what's below.
Do you need the jobs to be stored in a database or would some filebased
solution work for you?

 
> Regards
> 
> David
> 
> -----Original Message-----
> From: Jason van Zyl [mailto:jvanzyl@zenplex.com]
> Sent: 28 December 2001 20:34
> To: Turbine Users List
> Subject: Re: One Time run of Scheduler Job?
> 
> 
> On 12/28/01 3:03 PM, "Pugh, Eric" <EP...@MuseumCompany.com> 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:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

-- 

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>