Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Tue, 10 Jul 2001 13:35:41 +0200 From: Corinna Vinschen To: cygwin Subject: Re: CRON and time Message-ID: <20010710133541.P8578@cygbert.vinschen.de> Mail-Followup-To: cygwin References: <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20010710004537 DOT 05a224d8 AT imap DOT local DOT mscha DOT com> <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20010628134148 DOT 03478e48 AT imap DOT mscha DOT org> <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20010628134148 DOT 03478e48 AT imap DOT mscha DOT org> <20010709121124 DOT I8578 AT cygbert DOT vinschen DOT de> <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20010710004537 DOT 05a224d8 AT imap DOT local DOT mscha DOT com> <20010710122716 DOT M8578 AT cygbert DOT vinschen DOT de> <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20010710124746 DOT 03f403b0 AT imap DOT local DOT mscha DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <5.1.0.14.2.20010710124746.03f403b0@imap.local.mscha.com>; from cygwin@mscha.com on Tue, Jul 10, 2001 at 12:55:20PM +0200 On Tue, Jul 10, 2001 at 12:55:20PM +0200, Michael Schaap wrote: > However, one thing is funny. My test crontab had a command like "date >> > /tmp/hello.txt", and that behaves slightly different with this version of cron. > When I run date from the cron-3.0.1-2 version, or when I run date from the > command line, I get output like: > Tue Jul 10 12:49:29 2001 > But when I run it with this freshly compiled cron, I get: > Tue Jul 10 12:49:00 T-1 2001 > I guess both are incorrect, from a UNIX point of view, and the second one > is actually a bit better than the first one... That's very likely related to your TZ setting. Since cron is running under LocalSystem account it gets only the system default environment without any user specific addition, even after switching the user context which only modifies the environment slightly. The difference is that the old cron had practically no environment except what it sets by itself. Try a command "* * * * * env > /tmp/foo" to see the environment you get. If the date output is somehow vital for you, just set TZ in either the system environment (which requires a reboot *sob*) or - preferred IMO - set TZ in your crontab file. Thanks for your test, I will upload the -4 version now to sourceware. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/