From owner-freebsd-questions@FreeBSD.ORG Sat Aug 28 20:04:55 2004 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 C0A6216A4CE for ; Sat, 28 Aug 2004 20:04:55 +0000 (GMT) Received: from priv-edtnes40.telusplanet.net (outbound05.telus.net [199.185.220.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F79543D48 for ; Sat, 28 Aug 2004 20:04:55 +0000 (GMT) (envelope-from viktorlazlo@telus.net) Received: from byx0rm.mr-clevver.com ([154.20.11.99]) by priv-edtnes40.telusplanet.netESMTP <20040828200454.XYNN25656.priv-edtnes40.telusplanet.net@byx0rm.mr-clevver.com>; Sat, 28 Aug 2004 14:04:54 -0600 Date: Sat, 28 Aug 2004 13:05:30 -0700 (PDT) From: Viktor Lazlo X-X-Sender: viktorlazlo@byx0rm.mr-clevver.com To: Joshua Tinnin In-Reply-To: <200408261313.16037.krinklyfig@spymac.com> Message-ID: <20040828120440.E72981@byx0rm.mr-clevver.com> References: <200408260007.26659.krinklyfig@spymac.com> <200408260109.12229.krinklyfig@spymac.com> <412E0193.6080904@daleco.biz> <200408261313.16037.krinklyfig@spymac.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-questions@freebsd.org Subject: Re: crontab question involving cvsup 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: Sat, 28 Aug 2004 20:04:55 -0000 On Thu, 26 Aug 2004, Joshua Tinnin wrote: > > >>man cron gives: > > >> > > >>crontab [-u user] file > > >> > > >>'file' being the important part, methinks. ;) > > > > > >I'm not sure what you mean ... If you're wondering, I'm using the > > > main crontab file (/etc/crontab), as right now there's no need for > > > me to use multiple ones. > > > > Just an aside, but a rather important one: /etc/crontab is the > > *system* crontab and shouldn't have your jobs in it. It may in fact > > be this issue that is causing the problem, but I've not looked into > > it enough to say unequivocally... > > I don't think this is true. For one thing, as suggested, directing > output of cvsup to /dev/null worked, and now my cron job is working. > Another is that neither the handbook nor the /etc/crontab file itself > warn about editing it. In fact, the handbook section 11.6 says, > "Important: You must not use the procedure described here to > edit/install the system crontab. Simply use your favorite editor: the > cron utility will notice that the file has changed and immediately > begin using the updated version." This is what I did. I didn't use the > crontab command to edit/install it, I just used an editor. > > > Since your job needs root privileges, you should put this in root's > > crontab, either by su'ing to root and running "crontab -e" at the > > prompt, or if you have sudo installed, "sudo crontab -e" will get you > > there. > > > > Unlike the system crontab, user crontabs, including root's, are > > under /var/cron; the file format is slightly different, and misuse > > of the system crontab for regular jobs is the cause of several > > FAQ posts we see here every few months or so; one of these goes > > something like, "why do I get an email from cron saying it can't > > complete my job, unknown user, etc. ??".... > > Again, I see nothing in the documentation warning against editing the > system crontab file, only that it can't be installed/edited with the > crontab command. The main danger in using /etc/crontab is that it can easily be wiped out during system updates, while user crontabs will not be affected. /etc/crontab does also use a slightly different format from user crontabs, which you need to be aware of if transferring entries between them. Cheers, Viktor