Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jan 2013 13:39:17 +0100
From:      Dwayne Henderson <its.code.in.here@gmail.com>
To:        ruby-talk@ruby-lang.org
Cc:        questions@freebsd.org
Subject:   Re: Crontabbing a Ruby script inside a screen
Message-ID:  <CAOOO88AGa-OAmQZpAfRBNo1niGbnXWHE0ychScNW0PVL2NwFfA@mail.gmail.com>
In-Reply-To: <CAM9pMnOrveFs=JdwJowyad2NWWV7Hi9FCm0w3aUMTNQV1tZqLA@mail.gmail.com>
References:  <CAOOO88C9p7GRFsC12SRHq_62sM%2BQJjwKgAH%2BDbtxANZOO0%2Bpng@mail.gmail.com> <CAM9pMnOrveFs=JdwJowyad2NWWV7Hi9FCm0w3aUMTNQV1tZqLA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 24, 2013 at 1:33 PM, Robert Klemme
<shortcutter@googlemail.com>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/
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOOO88AGa-OAmQZpAfRBNo1niGbnXWHE0ychScNW0PVL2NwFfA>