From owner-freebsd-questions@FreeBSD.ORG Thu Jan 24 12:39:24 2013 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 187892D4 for ; Thu, 24 Jan 2013 12:39:24 +0000 (UTC) (envelope-from its.code.in.here@gmail.com) Received: from mail-ie0-f178.google.com (mail-ie0-f178.google.com [209.85.223.178]) by mx1.freebsd.org (Postfix) with ESMTP id B747038E for ; Thu, 24 Jan 2013 12:39:23 +0000 (UTC) Received: by mail-ie0-f178.google.com with SMTP id c12so15743719ieb.9 for ; Thu, 24 Jan 2013 04:39:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=VxlbSDdGxyllnwGN1fXycryivBQXjV5M1ONqF234Ot8=; b=HYYldLmejkmT8N7aDugBXDZ9cHsh/HJFvIzSJuRfGWZ0bkEOOLXwiO93+pwG8h6Wxl UgFLhTCnm34qZBTtT8N9oVQWdIoM8gnSxn98Sham3HoggJCSTOvy4ZCjRTaDfLl0rrQ0 uyrImEacAY8/W4qwMjOlVJwTHlXJos+/Cpl9azX+vTs2ntk5AYRa3H1suHOcfD6ZD7dH TRbphHQtiOoySuVUnGPqSRk6FRpeFVotjMR0riNY5nSrd2WWd0B+EbjMB3NH1qFyPzvX /m3YjGotE1SCRfFgPbr24adYu2t8sGKE2UsuSU2fwFd3/vbnLmxj/4giaAZWpfORmso/ 6b+Q== MIME-Version: 1.0 X-Received: by 10.50.160.165 with SMTP id xl5mr1158844igb.54.1359031157677; Thu, 24 Jan 2013 04:39:17 -0800 (PST) Received: by 10.64.164.164 with HTTP; Thu, 24 Jan 2013 04:39:17 -0800 (PST) In-Reply-To: References: Date: Thu, 24 Jan 2013 13:39:17 +0100 Message-ID: Subject: Re: Crontabbing a Ruby script inside a screen From: Dwayne Henderson To: ruby-talk@ruby-lang.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jan 2013 12:39:24 -0000 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/ > >