From owner-freebsd-stable Sat Nov 2 19: 1:30 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0860E37B401 for ; Sat, 2 Nov 2002 19:01:29 -0800 (PST) Received: from sccrmhc01.attbi.com (sccrmhc01.attbi.com [204.127.202.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B38443E8A for ; Sat, 2 Nov 2002 19:01:28 -0800 (PST) (envelope-from crist.clark@attbi.com) Received: from blossom.cjclark.org ([12.234.91.48]) by sccrmhc01.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20021103030127.ZPYB8743.sccrmhc01.attbi.com@blossom.cjclark.org> for ; Sun, 3 Nov 2002 03:01:27 +0000 Received: from blossom.cjclark.org (localhost. [127.0.0.1]) by blossom.cjclark.org (8.12.3/8.12.3) with ESMTP id gA331QWn037374 for ; Sat, 2 Nov 2002 19:01:26 -0800 (PST) (envelope-from crist.clark@attbi.com) Received: (from cjc@localhost) by blossom.cjclark.org (8.12.3/8.12.3/Submit) id gA331P6N037373 for freebsd-stable@FreeBSD.ORG; Sat, 2 Nov 2002 19:01:25 -0800 (PST) X-Authentication-Warning: blossom.cjclark.org: cjc set sender to crist.clark@attbi.com using -f Date: Sat, 2 Nov 2002 19:01:25 -0800 From: "Crist J. Clark" To: freebsd-stable@FreeBSD.ORG Subject: Re: tz in cron Message-ID: <20021103030125.GA36615@blossom.cjclark.org> Reply-To: "Crist J. Clark" References: <00fd01c2804b$abf26fd0$0301a8c0@prime> <200210311016.g9VAGPSV036422@lurza.secnetix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200210311016.g9VAGPSV036422@lurza.secnetix.de> User-Agent: Mutt/1.4i X-URL: http://people.freebsd.org/~cjc/ Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Oct 31, 2002 at 11:16:25AM +0100, Oliver Fromme wrote: > Charles Swiger wrote: > > Randy Bush wrote: > > > in the man page and the code, i can see nothing like netbsd's CRON_TZ. > > > so if i do, for example, TZ=GMT in crontab, can i run it in zulu? > > > > Setting environment variables in the crontab script sets them for the > > subshells it spawns to run the tasks. I think you'd need to set $TZ in the > > environment that starts cron, which probably is the /etc/rc scripts. > > Yes, but you don't have to modify /etc/rc itself. > The following in /etc/rc.conf will do: > > cron_program="/usr/sbin/cron-wrapper" > > And make /usr/sbin/cron-wrapper a shell script like this: > > #!/bin/sh - > export TZ=GMT > exec /usr/sbin/cron "$@" Wouldn't, cron_program="TZ=UTC /usr/sbin/cron" Be even easier? -- Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message