Saturday, June 16, 2007

Schedule cygwin shell script with windows' scheduler

The default cygwin shell actually is a Windows shell script. Below is the source code.

@echo off

C:
chdir C:\cygwin\bin

bash --login -i

To use the windows' scheduler, automatically pass the bash shell script to cygwin.bat is needed.
How? Here is the solution-- by using the redirect .

@echo off

REM C:
C:\cygwin\bin\bash --login -i <"C:\Documents and Settings\liqy\avupd.sh"