You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Kazandjian Erik <Er...@siemens.atea.be> on 2001/12/18 15:18:04 UTC

Scheduler, finally works !!!!!!!!

Oef,

After 4 days of hard labour we finally managed to get the scheduler service
running. However there is one little error that we would like to inform you
about and we would like somebody who has access to CVS repository to fix it.
The error is the following. When loading jobs from the cold storrage the
initial time is not calculated and there for the calls to getNextRuntime all
return 0, which results in an immediate execution of the job. This is not
desiareble for daily, weekly or monthly jobs.

This issue can be easely solved if the init method of the scheduler is
modified in the following way 

	if ( jobs != null && jobs.size() > 0 )
            {
/* These 3 lines fix the problem */
		Iterator i = jobs.iterator();

		while (i.hasNext())
			((JobEntry)i.next()).calcRunTime();

	


		scheduleQueue.batchLoad(jobs);
            	restart();
            }


I would like to thank everybody who had the patience to read and answer my
questions.

Erik

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


Re: Scheduler, finally works !!!!!!!!

Posted by Jason van Zyl <jv...@zenplex.com>.
On 12/18/01 9:18 AM, "Kazandjian Erik" <Er...@siemens.atea.be>
wrote:

> Oef,
> 
> After 4 days of hard labour we finally managed to get the scheduler service
> running. However there is one little error that we would like to inform you
> about and we would like somebody who has access to CVS repository to fix it.

Send a patch and I would be happy to apply it.

> The error is the following. When loading jobs from the cold storrage the
> initial time is not calculated and there for the calls to getNextRuntime all
> return 0, which results in an immediate execution of the job. This is not
> desiareble for daily, weekly or monthly jobs.
> 
> This issue can be easely solved if the init method of the scheduler is
> modified in the following way
> 
> if ( jobs != null && jobs.size() > 0 )
>           {
> /* These 3 lines fix the problem */
> Iterator i = jobs.iterator();
> 
> while (i.hasNext())
> ((JobEntry)i.next()).calcRunTime();
> 
> 
> 
> 
> scheduleQueue.batchLoad(jobs);
> restart();
>           }
> 
> 
> I would like to thank everybody who had the patience to read and answer my
> questions.

Please send a unidiff, look here for the exact syntax:

http://jakarta.apache.org/site/bugs.html
 
> Erik
> 
> --
> 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>