Crontabbing a Ruby script inside a screen

Dwayne Henderson its.code.in.here at gmail.com
Thu Jan 24 12:39:24 UTC 2013


On Thu, Jan 24, 2013 at 1:33 PM, Robert Klemme
<shortcutter at 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/
>
>


More information about the freebsd-questions mailing list