delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/08/18/12:19:13

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Wed, 18 Aug 2004 12:18:57 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Dave Korn <dk AT artimi DOT com>
cc: cygwin AT cygwin DOT com
Subject: RE: Cron problem/Documentation and Setup
In-Reply-To: <NUTMEGr5h1inenB57vS00000e21@NUTMEG.CAM.ARTIMI.COM>
Message-ID: <Pine.GSO.4.61.0408181215220.1878@slinky.cs.nyu.edu>
References: <NUTMEGr5h1inenB57vS00000e21 AT NUTMEG DOT CAM DOT ARTIMI DOT COM>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39

On Wed, 18 Aug 2004, Dave Korn wrote:

> > -----Original Message-----
> > From: cygwin-owner On Behalf Of Igor Pechtchanski
> > Sent: 18 August 2004 16:54
> 
> > > > > 18 17 * * * pwd >> /tmp/debug.log 2>&1
> > > > > 19 17 * * * ls >> /tmp/debug.log 2>&1
> > > > > 20 17 * * * ls -l /tmp/myscript >> /tmp/debug.log 2>&1
> > > > > 21 17 * * * /tmp/myscript >> /tmp/debug.log 2>&1
> 
> > 19 17 * * * ls >> /tmp/debug.log 2>&1
> > 20 17 * * * ls -l /tmp/myscript >> /tmp/debug.log 2>&1
> 
>   I haven't been following, so PMFBI, but can I just point out that it may
> well be necessary that the 2>&1 should precede the >> /tmp/debug.log if you
> want stderr to actually end up in the log file....

Nope, that part was correct.  If you put 2>&1 before the >> redirection, 
stderr will end up on stdout.  See the sh and bash manpages.

>   BTW, "uname -a; pwd; set; export" might be a good diagnostic command to
> add as a cron job.... isn't this almost certainly a
> wrong-user-executing-the-job problem?

Huh?  "uname -a" should only be useful if there's more than one Cygwin 
version on the machine -- otherwise, the output should be identical for 
all users.  "pwd" is already there.  I don't see how "set;export;" is 
relevant at all, frankly...  Did you, by chance, mean "id" instead?
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019