From owner-freebsd-questions@FreeBSD.ORG Thu Sep 18 02:13:11 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F2DB416A4B3 for ; Thu, 18 Sep 2003 02:13:10 -0700 (PDT) Received: from spam1.snu.ac.kr (spam2.snu.ac.kr [147.46.10.68]) by mx1.FreeBSD.org (Postfix) with SMTP id 6560443FBF for ; Thu, 18 Sep 2003 02:13:09 -0700 (PDT) (envelope-from lahaye@snu.ac.kr) Received: (snipe 11381 invoked by alias); 18 Sep 2003 09:42:11 -0000 Received: from lahaye@snu.ac.kr with Spamsniper2.0 (Processed in 0.051455 secs); Received: from unknown (HELO sis1.snu.ac.kr) (147.46.10.36) by 0 with SMTP; 18 Sep 2003 09:42:11 -0000 X-RCPTTO: freebsd-questions@FreeBSD.ORG,gihl@nesic.com.ph, Received: from snu.ac.kr ([147.46.44.183]) by sis1.snu.ac.kr (8.12.9/8.12.9) with ESMTP id h8I9CD9H284862; Thu, 18 Sep 2003 18:12:14 +0900 Message-ID: <3F697722.3000302@snu.ac.kr> Date: Thu, 18 Sep 2003 18:13:06 +0900 From: Rob Lahaye Organization: Seoul National University - South Korea User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20030726 X-Accept-Language: en-us, ko-kr MIME-Version: 1.0 To: Gil Agno Virtucio , freebsd-questions@FreeBSD.ORG References: In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: randomize execution the a script? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2003 09:13:11 -0000 Gil Agno Virtucio wrote: > Hi. I want to randomize the execution of a shell script. Can i use cron > to do this? or are there other available tools that i can use to do this? See 'man 6 random' and 'man sleep'. Then try doing something like this in the background: #!/bin/sh while true do random -e 60 randomNumber=$? sleep $randomNumber done Where '60' means, maximum 60 seconds between two script calls. There might be better or nices ways of doing this :). Rob.