From owner-freebsd-stable Thu Oct 31 2:16:47 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 E133437B401 for ; Thu, 31 Oct 2002 02:16:45 -0800 (PST) Received: from lurza.secnetix.de (lurza.secnetix.de [212.66.1.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id BCB4843E6E for ; Thu, 31 Oct 2002 02:16:44 -0800 (PST) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [IPv6:::1]) by lurza.secnetix.de (8.12.6/8.12.5) with ESMTP id g9VAGPdK036423 for ; Thu, 31 Oct 2002 11:16:25 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.12.6/8.12.5/Submit) id g9VAGPSV036422; Thu, 31 Oct 2002 11:16:25 +0100 (CET) Date: Thu, 31 Oct 2002 11:16:25 +0100 (CET) Message-Id: <200210311016.g9VAGPSV036422@lurza.secnetix.de> From: Oliver Fromme To: freebsd-stable@FreeBSD.ORG Reply-To: freebsd-stable@FreeBSD.ORG Subject: Re: tz in cron In-Reply-To: <00fd01c2804b$abf26fd0$0301a8c0@prime> X-Newsgroups: list.freebsd-stable User-Agent: tin/1.5.4-20000523 ("1959") (UNIX) (FreeBSD/4.7-RELEASE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit 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 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 "$@" Regards Oliver -- Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "All that we see or seem is just a dream within a dream" (E. A. Poe) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message