From owner-freebsd-newbies@FreeBSD.ORG Sun Sep 19 17:54:43 2004 Return-Path: Delivered-To: freebsd-newbies@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 53F0E16A4CE for ; Sun, 19 Sep 2004 17:54:43 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 5512B43D31 for ; Sun, 19 Sep 2004 17:54:42 +0000 (GMT) (envelope-from mayday@gmx.net) Received: (qmail 22530 invoked by uid 65534); 19 Sep 2004 17:54:41 -0000 Received: from pD95EE1AF.dip0.t-ipconnect.de (EHLO [192.168.0.5]) (217.94.225.175) by mail.gmx.net (mp002) with SMTP; 19 Sep 2004 19:54:41 +0200 X-Authenticated: #431110 From: Benjamin Sobotta To: robg Date: Sun, 19 Sep 2004 20:04:40 +0000 User-Agent: KMail/1.6.2 References: <5c389d3b040919104228593a14@mail.gmail.com> In-Reply-To: <5c389d3b040919104228593a14@mail.gmail.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200409192004.40547.mayday@gmx.net> cc: freebsd-newbies@freebsd.org Subject: Re: can someone explain crontab to me better? X-BeenThere: freebsd-newbies@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Gathering place for new users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2004 17:54:43 -0000 Hi! Those entries have nothing to do with duration. The entry of you would run every two hours or better every even hour and then every 5 minutes like: 8:00 8:05 8:10 . 8:55 10:00 10:05 10:10 . . . so if you want something to run every two hours it should look like 10 */2 * * * root /usr/libexec/locate.updatedb This would make it run like 8:10 10:10 12:10 . . I hope this helps - and works :) Haven't tried it. Cheers, Ben On Sunday 19 September 2004 17:42, robg wrote: > hi, > > i am having a hard time understanding crontab after reading > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-cron >.html .. i still can't understand the minutes/hours... > > when you specify minutes, does it mean the command is run every X > minutes? and if you specify a hour AND minutes, the command is run > every X hours for X minutes? so if i did > > */5 */2 * * * root /usr/libexec/locate.updatedb > > it would run that command every two hours for 5 minutes? so when two > hours comes around, itll keep running that command over and over for 5 > minutes? or will it run that command once every 5 minutes for two > hours? im confused > > i just want to know the syntax to run something every 2 hours once .. > can someone clarify this > > thanks