Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Jun 2012 14:08:49 +0200
From:      Dwayne Henderson <its.code.in.here@gmail.com>
To:        Jens Jahnke <jan0sch@gmx.net>
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?
Message-ID:  <CAOOO88Cvopreh4VrFgpSZ4myaJwu%2Bh2OeApFAOq2RbxC_58ZkA@mail.gmail.com>
In-Reply-To: <20120602125743.fea43448.jan0sch@gmx.net>
References:  <CAOOO88D089cm7Hm00kxPTzGc6p8yHn1bBFFz_4w_JADrMK1z5w@mail.gmail.com> <20120601213900.2d0825b6.jan0sch@gmx.net> <CAOOO88CPU2z7GSickCz3%2BEQhXTjEN8iWNxdUA1JNf=yq2wbaaA@mail.gmail.com> <20120602125743.fea43448.jan0sch@gmx.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <jan0sch@gmx.net> wrote:

> Hello Dwayne,
>
> On Sat, 2 Jun 2012 10:59:09 +0200
> Dwayne Henderson <its.code.in.here@gmail.com> 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.
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOOO88Cvopreh4VrFgpSZ4myaJwu%2Bh2OeApFAOq2RbxC_58ZkA>