delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SARE_SPEC_REPLICA_OBFU |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <75e9b2701003211010n4222abb1s9f8491e20db8b3e4@mail.gmail.com> |
References: | <75e9b2701003211010n4222abb1s9f8491e20db8b3e4 AT mail DOT gmail DOT com> |
Date: | Mon, 22 Mar 2010 10:58:34 +0100 |
Message-ID: | <1ef5a52f1003220258s1f2d15c0lef529d2e6758f371@mail.gmail.com> |
Subject: | Re: 1.7.1- Scheduled Tasks runs but lacks 'du -kh' output |
From: | Csaba Raduly <rcsaba AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
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 |
On Sun, Mar 21, 2010 at 6:10 PM, computer tech wrote: > I have a .bat file, that is scheduled to run as NT Authority\System > every morning. The schedule tasks calls the run.bat file. =A0The script > is running at the schedule time, but when I check the files in the > morning the only output is from the 'echo' commands(see hello-fs2.sh > script below). I don't see any of the output from the 'du' and 'find' > commands(see hello-fs2.sh script below). =A0When I manually run the > script from the cygwin command line it works properly as intended. The > machine is running WinXP SP 3 with A pentium 4 processor(3.0ghz). > > ---- file run.bat > @echo off > C:\cygwin\bin\bash.exe --login -c "/home/bob/hello-fs2.sh" > ---- > ---- file hello-fs2.sh > #!/usr/bin/bash > DIR=3D//device01/shares/replica/ > OUT=3D/cygdrive/c/logs > echo `date` >> $OUT/Avondale-foldersize.txt > du -k --max-depth=3D1 $DIR | sort -nr >> $OUT/foldersize.txt Try capturing stderr too, it may provide a hint. Something like: du -k --max-depth=3D1 $DIR 2>>$OUT/du.err | sort -nr >> $OUT/foldersize.txt > echo `date` >> $OUT/Changedfile.txt > find $DIR -type f -mtime -1 -print >> $OUT/Changedfile.txt find $DIR -type f -mtime -1 -print >> $OUT/Changedfile.txt 2>>$OUT/find.err > echo "---- done --- " >> $OUT/Changedfile.txt > ---- Maybe SYSTEM doesn't have permission to read //device01/shares/replica/ or write c:\logs --=20 Life is complex, with real and imaginary parts -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |