You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Patrick <pa...@gmail.com> on 2010/03/25 00:20:09 UTC

Want Service to be always running

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

Re: Want Service to be always running

Posted by Adrian Crum <ad...@yahoo.com>.
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 <pa...@gmail.com> wrote:

> From: Patrick <pa...@gmail.com>
> Subject: Re: Want Service to be always running
> To: user@ofbiz.apache.org
> 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 <ad...@hlmksw.com>
> 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
> >>
> >
> 


      

Re: Want Service to be always running

Posted by Patrick <pa...@gmail.com>.
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 <ad...@hlmksw.com> 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
>>
>

Re: Want Service to be always running

Posted by Adrian Crum <ad...@hlmksw.com>.
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
>