Subject: Re: Invoking script non-interactively
From: [email-masked] (Michael Weiser)

23 May 1998 13:43:11 -0700
Message-ID: <3569a190.2098207.cygnus.gnu-win32@mail>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: "Ashish Khurana" <[email-masked]>
Cc: [email-masked]

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
"[email-masked]" with one line of text: "help".