This is the mail archive of the cygwin mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi!
I'm using cygwin and this command in a function works when I'm logged in as me:
gzip -f ./$1.sql 2>> error.log
so it zips hyperquest_v2.sql as the argument I send it is "hyperquest_v2".
When this is run from NT AUTHORITY\SYSTEM as a scheduled task, I get an error. So I put in some debug output: (I also have to specify where gzip.exe is so that account can find it, hence the "/usr/bin/" part)
echo "/usr/bin/gzip -f ./$1.sql 2>> error.log" >> error.log usr/bin/gzip -f ./$1.sql 2>> error.log
The output I get is:
hyperquest_v2.sql /usr/bin/gzip -f ./hyperquest_v2.sql 2>> error.log usr/bin/gzip: No such file or directory
Could it be that the current working directory (.) in this scenario is not the one you think it is? It may be some random place that the scheduled task is using ... Maybe echo $PWD to see?
-- 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
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |