Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Sep 2008 11:24:32 -0500
From:      Paul Schmehl <pschmehl_lists@tx.rr.com>
To:        Albert.Shih@obspm.fr, ElihuJ <chinocubus@yahoo.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Cron Question
Message-ID:  <D59C3198F12C06340437288A@Macintosh.local>
In-Reply-To: <20080902160351.GI79391@pcjas.obspm.fr>
References:  <19272656.post@talk.nabble.com> <20080902160351.GI79391@pcjas.obspm.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
--==========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 <Albert.Shih@obspm.fr> =

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==========--




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