From owner-freebsd-questions Thu Nov 21 14:29:40 2002 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 D7AF037B432 for ; Thu, 21 Nov 2002 14:29:35 -0800 (PST) Received: from the-frontier.org (ns1.the-frontier.org [216.86.199.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AB8A43E97 for ; Thu, 21 Nov 2002 14:29:30 -0800 (PST) (envelope-from pscott@skycoast.us) Received: from [192.168.66.249] (dhcp-249-66-168-192.the-frontier.org [192.168.66.249]) by the-frontier.org (8.9.3/8.9.3) with ESMTP id OAA86733; Thu, 21 Nov 2002 14:29:03 -0800 (PST) (envelope-from pscott@skycoast.us) User-Agent: Microsoft-Entourage/10.0.0.1309 Date: Thu, 21 Nov 2002 14:29:03 -0800 Subject: Re: Changing to/from user within script From: "Paul A. Scott" To: Jeff Penn , Message-ID: In-Reply-To: <20021121221155.GA3926@jrpenn.demon.co.uk> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > I want to run a cron job as a user on my system. Once the job has > completed I need root privileges to power the system down. I don't > mind if the script has to run as a root cron job, but running the > processing as a user will prevent against filling a partition. > > Can this be done without running two different cron jobs?. Not sure if I understand the problem, but it seems to me that you can run script as root from cron, and resource limits can be controlled with the shell's 'ulimit' (sh) or 'limit' (csh) commands. -- Paul A. Scott mailto:pscott@skycoast.us http://skycoast.us/pscott/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message