From owner-freebsd-questions@FreeBSD.ORG Wed Feb 16 09:40:56 2005 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 504A316A4CE for ; Wed, 16 Feb 2005 09:40:56 +0000 (GMT) Received: from lorna.circlesquared.com (host217-45-219-85.in-addr.btopenworld.com [217.45.219.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD48343D46 for ; Wed, 16 Feb 2005 09:40:54 +0000 (GMT) (envelope-from peter@circlesquared.com) Received: from localhost.circlesquared.com (localhost.circlesquared.com [127.0.0.1])j1G9euFJ091116 for ; Wed, 16 Feb 2005 09:40:56 GMT (envelope-from peter@circlesquared.com) From: Peter Risdon To: "freebsd-questions@freebsd.org" Content-Type: text/plain Date: Wed, 16 Feb 2005 09:40:55 +0000 Message-Id: <1108546855.23699.320.camel@lorna.circlesquared.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Subject: scripting crontab entries 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: Wed, 16 Feb 2005 09:40:56 -0000 I want to be able to update a user's crontab from a script. tabs in /var/cron/tabs carry a warning that the file should not be edited directly, so presumably something like #echo "5 * * * * /some/script.sh" >> /var/cron/tabs/$USER is the wrong approach. Is the right approach: #cat ~/.mycrontab 5 * * * * /some/script.sh #crontab ~/.mycrontab The right way to go? I notice this approach blows away existing crontab entries, and was hoping to be able to append new ones instead, but then by treating ~/.mycrontab as the master file, I can manage this OK. TIA. Peter.