From owner-freebsd-questions@FreeBSD.ORG Fri May 9 06:24:40 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 F1C4D37B401 for ; Fri, 9 May 2003 06:24:39 -0700 (PDT) Received: from grillolja.cs.umu.se (grillolja.cs.umu.se [130.239.40.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id D73E743F93 for ; Fri, 9 May 2003 06:24:38 -0700 (PDT) (envelope-from tdv94ped@cs.umu.se) Received: from localhost (localhost [127.0.0.1]) by amavisd-new (Postfix) with ESMTP id 56BFBA03C; Fri, 9 May 2003 15:24:37 +0200 (MEST) Received: from cs.umu.se (h169n1c1o1023.bredband.skanova.com [213.64.164.169]) by grillolja.cs.umu.se (Postfix) with ESMTP id A5B6DA032; Fri, 9 May 2003 15:24:34 +0200 (MEST) Message-ID: <3EBBAC06.80502@cs.umu.se> Date: Fri, 09 May 2003 15:24:22 +0200 From: Paul Everlund User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: sv,en MIME-Version: 1.0 To: crnholio References: <20030509145159.2d620aad.crnholio@gmx.ch> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new cc: freebsd-questions@freebsd.org Subject: Re: crontab question 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: Fri, 09 May 2003 13:24:40 -0000 crnholio wrote: > hi list, > > i have a simple question concerning crontab. i would like to execute > a program every day at 0:45 o'clock and kill it at 6:00. this is the > entry i made in /etc/crontab: > > 45 0 * * * crnholio program > 0 6 * * * crnholio killall -9 program > > well, it doesn't work and i guess i haven't understood how to enter > the exact time into the file. could somebody please enlighten me? :) > > thanks in advance, > crnholio Hi! You should not put entries in /etc/crontab. Instead use 'crontab -l' to list your crontab entries. If logged in as root, it will show root's entries. If logged in as crnholio, it will show crnholio's en- tries. Using 'crontab -e' you can edit your own entries with an editor. Use 'setenv EDITOR "your favourite editor"' to change from vi to "your favourite editor". Put the following in your crontab: 45 0 * * * program 0 6 * * * killall -9 program I'm not sure this will help, but it's the correct way to do it. :-) Best regards, Paul