I'm writing a script that will run from the Task Scheduler. It's not executing correctly from the Scheduler, but will execute correctly from the command line. (Possibly a permissions issue?) I wanted to redirect the output to a text file, but I'm getting an empty results.txt
file when executed from either the command line or the Scheduler.
This is the content of the batch file:
D:
chdir D:\scripts
C:\cygwin\bin\bash --login -i D:\scripts\myscript.sh > results.txt