From: Dwayne Henderson Date: 2013-01-24T21:39:19+09:00 Subject: Re: Crontabbing a Ruby script inside a screen --14dae9340efd645de204d4081983 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Jan 24, 2013 at 1:33 PM, Robert Klemme wrote: > > I am not 100% sure what you want to achieve. But it seems to me that > it would be easier to wrap your Ruby script in something else that > restarts the script if it crashes. Like > > #!/usr/bin/dash > > # no cores > ulimit -c 0 > > while :; do > /home/anonymous/.rvm/rubies/ruby-1.9.3-p0/bin/ruby > /home/anonymous/myscript.rb > done > > And have screen start this script. > My God, Robert, this is brilliant :D Thanks a bunch man. Nice blog too! --Dwayne > > Kind regards > > robert > > -- > remember.guy do |as, often| as.you_can - without end > http://blog.rubybestpractices.com/ > > --14dae9340efd645de204d4081983 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Thu, Jan 24, 2013 at 1:33 PM, Robert Klemme <shortcutter@googl= email.com> wrote:

I am not 100% sure what you want to achieve. =A0But it seems to= me that
it would be easier to wrap your Ruby script in something else that
restarts the script if it crashes. =A0Like

#!/usr/bin/dash

# no cores
ulimit -c 0

while :; do
=A0 /home/anonymous/.rvm/rubies/ruby-1.9.3-p0/bin/ruby /home/anonymous/mysc= ript.rb
done

And have screen start this script.

My God, Robert,= this is brilliant :D

Thanks a bunch man. Nice blog too!

--Dw= ayne

=A0

Kind regards

robert

--
remember.guy do |as, often| as.you_can - without end
http://blo= g.rubybestpractices.com/


--14dae9340efd645de204d4081983--