This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Invoking script non-interactively
- To: "Ashish Khurana" <akkhurana at hotmail dot com>
- Subject: Re: Invoking script non-interactively
- From: michael at weiser dot saale-net dot de (Michael Weiser)
- Date: Sat, 23 May 1998 10:29:29 GMT
- Cc: gnu-win32 at cygnus dot com
- References: <19980521204718.11805.qmail@hotmail.com>
Hwllo Ashish,
You wrote:
>I've few build and test scripts which I want to run automatically thru'
>some scheduler on NT. But for the scripts we have to run Cygnus.bat
There's a service built into WinNT called "at". It has a shell command
"at" to add/remove/change the job list of the service. There's some
quite comprehensive information in Windows Help (Start->Help->Windows
NT commands->Windows NT commands).
(Because I run a German WinNT your GUI Texts and Help files may be
different.)
>first in order to get the shell environment then give the command.
>Is it possible to write some sort of batch file that runs Cygnus.bat and
>then my script/command under it. Basically I need a non-interactive way
>of running my script.
You could make a copy of your cygnus.bat and make bash execute your
script by adding it to the call. This could look like this:
@ECHO OFF
SET MAKE_MODE=unix
SET CYGWIN32=tty
SET CYGROOT=e:\cpp\cygwin32.b19
SET CYGFS=e:/cpp/cygwin32.b19
SET CYGREL=B19
SET GCC_EXEC_PREFIX=%CYGROOT%\usr\lib\gcc-lib\
SET TCL_LIBRARY=%CYGROOT%\usr\share\tcl8.0\
SET GDBTK_LIBRARY=%CYGFS%/usr/share/gdbtcl
SET PATH=%CYGROOT%\bin;%CYGROOT%\usr\bin;%PATH%
SET HOME=/home/%USERNAME%
echo Cygnus Cygwin32 %CYGREL%
bash /bin/myscript
Then you could add this new batch to the at-daemon's job list and have
it executed when you need it.
bye
Michael
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".