From owner-freebsd-questions@FreeBSD.ORG Tue Sep 2 16:24:40 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 082E3106567C for ; Tue, 2 Sep 2008 16:24:40 +0000 (UTC) (envelope-from pschmehl_lists@tx.rr.com) Received: from cdptpa-omtalb.mail.rr.com (cdptpa-omtalb.mail.rr.com [75.180.132.120]) by mx1.freebsd.org (Postfix) with ESMTP id 8E50C8FC1E for ; Tue, 2 Sep 2008 16:24:39 +0000 (UTC) (envelope-from pschmehl_lists@tx.rr.com) Received: from [192.168.2.102] (really [24.175.90.48]) by cdptpa-omta04.mail.rr.com with ESMTP id <20080902162438.YKMO13299.cdptpa-omta04.mail.rr.com@[192.168.2.102]>; Tue, 2 Sep 2008 16:24:38 +0000 Date: Tue, 02 Sep 2008 11:24:32 -0500 From: Paul Schmehl To: Albert.Shih@obspm.fr, ElihuJ Message-ID: In-Reply-To: <20080902160351.GI79391@pcjas.obspm.fr> References: <19272656.post@talk.nabble.com> <20080902160351.GI79391@pcjas.obspm.fr> X-Mailer: Mulberry/4.0.8 (Mac OS X) X-Munged-Reply-To: To reply - figure it out MIME-Version: 1.0 Content-Type: multipart/signed; micalg=sha1; protocol="application/pkcs7-signature"; boundary="==========D56D71187A0EEFAEC3DE==========" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: Cron Question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Paul Schmehl List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2008 16:24:40 -0000 --==========D56D71187A0EEFAEC3DE========== Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline --On September 2, 2008 6:03:51 PM +0200 Albert Shih = wrote: > Le 02/09/2008 =C3=A0 08:45:52-0700, ElihuJ a =C3=A9crit >> >> Hi all. I have a question about cron jobs that seem to be running to >> long or with multiple copies of itself. For example, I have a backup >> script that I run that seems to make multiple copies of itself. If I >> view the running processes I see numerous instances of the same cron >> job. Is there something I can do to limit this from happening? When it >> does, it drains my CPU and some of my other processes are non >> responsive. Any help would be appreciated. Thank you. > > That's not the to cron to do that. Actually, it could be. If the script is started by cron and is still=20 running when the next job is scheduled, cron will start another process.=20 If they're both still running when the next job is scheduled, you'll have=20 three processes running, etc., etc. The first thing I would do is run the script manually and see how long it=20 takes to complete. Then set your cron jobs up to run with enough time=20 between them for the script to complete and exit before the next job=20 starts. Paul Schmehl, If it isn't already obvious, my opinions are my own and not those of my employer. ****************************************** WARNING: Check the headers before replying --==========D56D71187A0EEFAEC3DE==========--