[Opensource] Re: Cron Jobs
Michael Rimov
rimovm at centercomp.com
Tue May 6 12:40:38 PDT 2003
At 12:14 AM 5/4/2003 -0500, you wrote:
>Mike, I found some thread-timing problems with using the JobHandlerControl
>to 'restart' jobs. I avoided this by simply requesting a 'stop' and then
>modifying the JobQueue entry to enable the job for startup by setting:
>StatusCode='A' and ServerID=0
That's what I've been doing too, actually.
>As far as server restart, I found that any job scheduled in the future
>would have a StatusCode='R' (ie 'running' since it would have already been
>processed by the controller) and that it would be picked up on server
>restart for future launching.
>Not sure if I answered your question....
Yes it did.
>I had problems with 'recurring' 'multi-threaded' cron jobs. If I recall
>there was an anonymous inner class that would try to start() the thread on
>the 2nd 'recurrence' of the job but Java raises an exception when
>attempting this on a dead thread. I believe the code was trapping that
>exception and just ignoring it! I made a weak attempt at fixing this by
>creating new instances of the job/thread but ran into some problems so I
>went with non-recurring multi-threaded jobs and had added multiple entries
>in the JobQueue table. If you go this route watch for the MaxJobs limit
>because it counts jobs scheduled in the future as part of that limit!
>I believe I also tried the single-threaded recurring route but some
>problems with poor thread-usage caused me to stick with the multi-threaded
>non-recurring jobs.
Thanks for the info. I haven't done any multithreaded jobs, since I too
have been walking through the JobHandler to remove race
conditions. Between 5.0 and 5.0.4 I believe I've fixed about 5-6 issues,
so you might want to give 5.0.4 a try to see if that takes care of things yet.
HTH, and thanks for the feedback!
-Mike
More information about the Opensource
mailing list