"A simple cronjob with <solr directory>/bin/solr status and <solr
directory>/bin/solr start should do the trick."

I don't know what that would look like.  Wouldn't the job have to check the
status and only give the start command if solr isn't running?  I don't
think it's possible to put logic in a cron job. I think it would have to be
in a script, with a cron job to run the script.  I've never had cause to
write such a script, though, so I don't know how it's done.


On Fri, Jun 5, 2020 at 11:19 AM Dunigan, Craig A. <
craig.duni...@landsend.com> wrote:

> A simple cronjob with <solr directory>/bin/solr status and <solr
> directory>/bin/solr start should do the trick.  There must be a Windows
> equivalent if that’s what you’re using.
>
> From: Ryan W <rya...@gmail.com>
> Sent: Thursday, June 4, 2020 11:39 AM
> To: solr-user@lucene.apache.org
> Subject: Re: Script to check if solr is running
>
> WARNING: This email originated outside of Lands’ End. Please be on the
> lookout for phishing scams and do not open attachments or click links from
> people you do not know..
>
> Or is it not much overhead to give the command to start solr if it is
> already running? Maybe it's not necessary to check if it's running? Is
> there any downside to giving the start command every 15 minutes or so
> whether it is running or not?
>
> Thanks.
>
> On Thu, Jun 4, 2020 at 12:36 PM Ryan W <rya...@gmail.com<mailto:
> rya...@gmail.com>> wrote:
>
> > Does anyone have a script that checks if solr is running and then starts
> > it if it isn't running? Occasionally my solr stops running even if there
> > has been no Apache restart. I haven't been able to determine the root
> > cause, so the next best thing might be to check every 15 minutes or so if
> > it's running and run it if it has stopped.
> >
> > Thanks.
> >
>

Reply via email to