Cron Question

Paul Schmehl pschmehl_lists at tx.rr.com
Tue Sep 2 16:24:40 UTC 2008


--On September 2, 2008 6:03:51 PM +0200 Albert Shih <Albert.Shih at obspm.fr> 
wrote:

>  Le 02/09/2008 à 08:45:52-0700, ElihuJ a écrit
>>
>> 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 
running when the next job is scheduled, cron will start another process. 
If they're both still running when the next job is scheduled, you'll have 
three processes running, etc., etc.

The first thing I would do is run the script manually and see how long it 
takes to complete.  Then set your cron jobs up to run with enough time 
between them for the script to complete and exit before the next job 
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


More information about the freebsd-questions mailing list