From owner-freebsd-questions@FreeBSD.ORG Sat Jun 2 12:08:51 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6A2961065676 for ; Sat, 2 Jun 2012 12:08:51 +0000 (UTC) (envelope-from its.code.in.here@gmail.com) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx1.freebsd.org (Postfix) with ESMTP id E80D78FC15 for ; Sat, 2 Jun 2012 12:08:50 +0000 (UTC) Received: by wibhn6 with SMTP id hn6so1167213wib.13 for ; Sat, 02 Jun 2012 05:08:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=tT20i/f5oI/+jKJvGLjs3TLi3NITDpXZZrGE/R7QTbc=; b=yFcBe14Pi154lEbQKjAeSZNwiFj/3YOsXXnlqT5bowf0pEmPH0GD7etMqcNX+1Z7jE lMIIkeyRq6+E3uNAWMrav1hL/qXAAi5nRkcJBc8IQWNdFOxIpKUXkT3Z34eaZemaHpb7 o+8QM1KXMb7m0B9j1/k0ie/yO+NaEAGLL4lKJy/xONqC7F/5Q68dB5zh3CekNhh2IhJI amY0RQZlXyeF9Oy+JkmcDS77uixnqH+daSIG1LsMwlFp2iJx5nFJQbirO1jxca91Ry7G 3uH3JNx4mu+iQAaYwc+u9UZ/BaYbLiKeEJEDhN5juVIHlJlazvAOEKolzsEbZDhrrwyb BHLQ== MIME-Version: 1.0 Received: by 10.216.220.82 with SMTP id n60mr5221175wep.48.1338638929088; Sat, 02 Jun 2012 05:08:49 -0700 (PDT) Received: by 10.223.95.201 with HTTP; Sat, 2 Jun 2012 05:08:49 -0700 (PDT) In-Reply-To: <20120602125743.fea43448.jan0sch@gmx.net> References: <20120601213900.2d0825b6.jan0sch@gmx.net> <20120602125743.fea43448.jan0sch@gmx.net> Date: Sat, 2 Jun 2012 14:08:49 +0200 Message-ID: From: Dwayne Henderson To: Jens Jahnke Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: How to crontab screen with script inside and a "don't run it if it's already running" check? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jun 2012 12:08:51 -0000 Any comments on this though? */10 * * * * lockf -t 0 /home/anonymous/.myscript.lock /usr/local/bin/screen -dm /home/anonymous/.rvm/rubies/ ruby-1.9.3-p0/bin/ruby /home/anonymous/myscript.rb Thanks for the help! --Dwayne On Sat, Jun 2, 2012 at 12:57 PM, Jens Jahnke wrote: > Hello Dwayne, > > On Sat, 2 Jun 2012 10:59:09 +0200 > Dwayne Henderson wrote: > > DH> Nice. But what to do if the machine reboots or whatever. Would you > DH> crontab your new Irssi alias? > > I'm not sure. On my remote box I usually start irssi by hand because it > only ceases if the machine is rebooted. ;-) > > The current alias itself would probably cause problems in > a crontab. But you could maybe wrap it into a modified if that only > calls the alias if the pgrep command returns an empty result. > > Regards, > > Jens > > -- > 02. Brachet 2012, 12:54 > Homepage : http://www.jan0sch.de > > Optimist, n.: > A bagpiper with a beeper. >