From owner-freebsd-questions@FreeBSD.ORG Mon Mar 6 16:36:11 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 4F25216A420 for ; Mon, 6 Mar 2006 16:36:11 +0000 (GMT) (envelope-from dannyman@toldme.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF16E43D45 for ; Mon, 6 Mar 2006 16:36:08 +0000 (GMT) (envelope-from dannyman@toldme.com) Received: by wproxy.gmail.com with SMTP id 67so1435739wri for ; Mon, 06 Mar 2006 08:36:08 -0800 (PST) Received: by 10.64.96.20 with SMTP id t20mr82081qbb; Mon, 06 Mar 2006 08:29:36 -0800 (PST) Received: by 10.64.125.14 with HTTP; Mon, 6 Mar 2006 08:29:36 -0800 (PST) Message-ID: <2a5241e00603060829q67354e29va361ab807c390e44@mail.gmail.com> Date: Mon, 6 Mar 2006 08:29:36 -0800 From: "Danny Howard" To: "Svein Halvor Halvorsen" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <2a5241e00603031657h21aadc95vdc528553a9348c70@mail.gmail.com> Cc: Noel Jones , freebsd-questions@freebsd.org Subject: Re: switching timezone within crontab? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2006 16:36:11 -0000 > On 3/4/06, Noel Jones wrote: > > Pretty sure the above will only set the timezone for your job, and not > > alter the schedule time. But I don't know a solution to your problem. > > How about running cron with the TZ environment set? > Ie. setting TZ=3DUTC in /etc/rc.d/cron > > I haven't tried this myself. Well, if I only ever wanted to schedule cron jobs in a single time zone, that might work. For my current case, its trying to transfer files over in a timely manner. I figured my local time zone hits last night's UTC midnight at 4pm or 5pm, depending on DST (this would be trivial if my UTC offset was static . . . DST is the most stupid kludge ever perpetrated . . .) . . . so, I just schedule the cron at 6pm, which is always at least an hour after midnight. (mmmm, delicious paradox. :) Thanks, -danny -- http://dannyman.toldme.com