1.7.1- Scheduled Tasks runs but lacks 'du -kh' output

computer tech comphandyman@gmail.com
Wed Mar 17 14:28:00 GMT 2010


I have a .bat file, that is scheduled to run as NT Authority\System
every morning. The schedule tasks calls the run.bat file.  The 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).  When I manually run the
script from the cygwin command line it works properly as intended. The
machine is runnings WinXP SP 3 with A petium 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=//device01/shares/replica/
OUT=/cygdrive/c/logs
echo `date` >> $OUT/Avondale-foldersize.txt
du -k --max-depth=1 $DIR | sort -nr >> $OUT/foldersize.txt
echo `date` >> $OUT/Changedfile.txt
find $DIR -type f -mtime -1 -print >> $OUT/Changedfile.txt
echo "---- done --- " >> $OUT/Changedfile.txt
----
Here is the output from one of the output files when the scheduled
tasks runs automatically. Like I explained the output is only the
'echo' commands not the from the 'du' and 'find' command.
---file Changedfile.txt
Wed Mar 17 03:17:02 USMST 2010
Done ----
----
Any insight into this problem will be truly appreciated. Thank you
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 15566 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20100317/9bfbf327/attachment.obj>
-------------- next part --------------
--
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


More information about the Cygwin mailing list