The standard practice is to create a service that runs once, then set up the Job Scheduler to run the service at regular intervals. So, instead of having a sleep statement inside a loop, the service runs though to completion, and the Job Scheduler acts as the timed loop.
-Adrian
--- On Wed, 3/24/10, Patrick <
[hidden email]> wrote:
> From: Patrick <
[hidden email]>
> Subject: Re: Want Service to be always running
> To:
[hidden email]
> Date: Wednesday, March 24, 2010, 4:26 PM
> I was thinking I'd just launch this
> service automatically when I start
> my instance of OfBiz, I'm not using Job Scheduler yet, but
> I'll use
> whatever you recommend.
>
> On Wed, Mar 24, 2010 at 6:21 PM, Adrian Crum <
[hidden email]>
> wrote:
> > Are you using the Job Scheduler?
> >
> > -Adrian
> >
> > Patrick wrote:
> >>
> >> I want my service, OrderReminderBot to be always
> running. Is there
> >> something special I have to do to put the thread
> to sleep so that I
> >> don't eat all the system resources? What's the
> best way to do this,
> >> or is there a good code example? Thanks
> >> Patrick
> >>
> >
>