Mail Archives: cygwin/2002/08/02/05:00:42
Demmer, Thomas wrote:
>Just a thought:
>Could the creation of a console be the problem?
>Can you redirect the console output to a file
>and retry?
>
Why not but I does not see how to do that
The last Bash line of my script is :
cmd /c $(cygpath -wa $PDMSEXE)'\mon.exe' tty SAM SYSTEM/XXXXXX /SAMPLE
monitor 'c:\tmp\batch\mac.mac'
I changed it to
cmd /c $(cygpath -wa $PDMSEXE)'\mon.exe' tty SAM SYSTEM/XXXXXX /SAMPLE monitor 'c:\tmp\batch\mac.mac' > c:/tmp/batch/redirectNT
When running the scipt in Bash console (not in cron), NT program creates
the console and file c:/tmp/batch/redirectNT is empty
Is there another syntax to redirect NT console output to a file ?
Thanks
Arnaud
>
>
>Ciao
>Tom
>
>>-----Original Message-----
>>From: arnaud GAND [SMTP:arnaud DOT gand AT seti-ic DOT com]
>>Sent: Friday, August 02, 2002 11:54 AM
>>To: Harig, Mark A.; cygwin AT cygwin DOT com
>>Subject: Re: Problem running cron
>>
>>
>>
>>Harig, Mark A. wrote:
>>
>>>cron is able to run many NT programs without any problems. Please
>>>provide more details about the problem that you are having. Or, to
>>>troubleshoot/diagnose the problem, try using some simple programs such
>>>as /usr/bin/date or /usr/bin/pwd in your cron table.
>>>
>>In fact I use already others programs with cron and it works fine.
>>
>>This NT program got two modes : a graphical one (with GUI) and a
>>terminal one (tty mode creating an NT console).
>>It is made of several modules (several little programs) cummunicating
>>with a file created in a working directory.
>>The tty mode of this NT program works fine when running in CYGWIN Bash.
>>Il creates a new console to output
>>messages and that's ok.
>>When run with cron, as soon as the second module of NT program is
>>loaded, it stops and
>>output a message regarding the communicating file (unable to open in
>>read mode). I t seems
>>that when run form cron, the second module is unable to open
>>communication file.
>>
>>Moreover I did run the program with NT Planning without any problem.
>>
>>
>>I made some tests to compare CYGWIN cron with planning service NT
>>regarding to a Bash script running the NT program.
>>My tests were done with the local user Administrator of PC NT 4. Here
>>are the tests made :
>>
>>1) Cron works on my NT station : I scheduled many others tasks without
>>errors
>>
>>2) The NT program Bash script is run under CYGWIN Bash and creates a log
>>file : IT WORKS
>>
>>3) The NT program Bash script is run with Planning NT (Bash is run first
>>with a bat File) : IT WORKS
>>
>>4) The Bash script is run as a task with CRON under CYGWIN : IT DOES NOT
>>WORK at all
>>
>>5) The NT program Bash script was modified, I added theses two lines :
>> export USERDOMAIN=AUTORITE NT
>> export USERNAME=SYSTEM
>> A new test show the the NT program is loaded but stops when running
>>second module
>>
>>6) I noted same troubles when running the program with rlogin or rsh
>>with CYGWIN. First module is running but the second one
>>not. The error message of NT program point out problem with
>>communication file (unable to open in READ mode).
>>
>>I wonder if this problem involve the NT Program console or privileges
>>regarding CYGWIN cron and NT Planning ?
>>
>>Here is the Bash script runned
>>
>>Thanks again for helping
>>
>>
>>#!/bin/bash
>>
>>
>># Ajout des differences env /Planning
>>#export PROMPT='$P$G'
>>#export !C:=C:\WINNT\system32
>>#export PATHEXT='.COM:.EXE:.BAT:.CMD'
>>export USERDOMAIN=AUTORITE NT
>>export USERNAME=SYSTEM
>>#export USERPROFILE='C:\WINNT\Profiles\Default User'
>>
>>export PDMSEXE=d:/logiciels/Cadcentre/Pdms11.3
>>export PMLLIB=$PDMSEXE/pmllib
>>export PDMSUI=$PDMSEXE/pdmsui
>>export PDMSPLOTS=$PDMSUI/plots
>>export PDMSDFLTS=$PDMSUI/DFLTS
>>export PDMSWK=c:/TEMP
>>export HOMEPATh=$TEMP
>>export PDMSUSER=c:/tmp/batch
>>export LM_LICENSE_FILE=7156 AT horus
>>export PDMSREPDIR=$PDMSEXE/PDMSUI/REPORTS
>>export PLOTCADC=$PDMSEXE/plot/PLOT.EXE
>>export CADC_PLOT_DIR=$PLOTCADC
>>export HELPDIR=$PDMSEXE/HELP
>>export PDMSHELPDIR=$PDMSEXE/HELP
>>
>>export MAS000=$PDMSEXE/project/mas000
>>export MASMAC=$PDMSEXE/project/masmac
>>export MASPIC=$PDMSEXE/project/maspic
>>export MASISO=$PDMSEXE/project/masiso
>>export SAM000=$PDMSEXE/project/sam000
>>export SAMMAC=$PDMSEXE/project/sammac
>>export SAMPIC=$PDMSEXE/project/sampic
>>export SAMISO=$PDMSEXE/project/samiso
>>export IMP000=$PDMSEXE/project/imp000
>>export IMPMAC=$PDMSEXE/project/impmac
>>export IMPPIC=$PDMSEXE/project/imppic
>>export IMPISO=$PDMSEXE/project/impiso
>>
>>export PATH=$PATH:$PDMSEXE:$PDMSEXE/dars:$PDMSEXE/autodraftACAD
>>
>>cd $PDMSUSER
>>
>>export HLP=PDMS
>>export CADCOLH=$PDMSEXE
>>export PDMS_CONSOLE_WINDOW=ACTIVE
>>
>>cmd /c $(cygpath -wa $PDMSEXE)'\mon.exe' tty SAM SYSTEM/XXXXXX /SAMPLE
>>monitor 'c:\tmp\batch\mac.mac'
>>
>>>
>>>>-----Original Message-----
>>>>From: arnaud GAND [mailto:arnaud DOT gand AT seti-ic DOT com]
>>>>Sent: Wednesday, July 31, 2002 10:54 AM
>>>>To: cygwin AT cygwin DOT com
>>>>Subject: Problem running cron
>>>>
>>>>
>>>>Hi,
>>>>
>>>>Is it normal that an NT program running with cron does not
>>>>work properly ?
>>>>( Program stops ans popup the message "mon.exe at
>>>>Ox006bac21... Memory
>>>>cannot be read ...")
>>>>This NT program creates a NT console and works fine when running in
>>>>CYGWIN Bash console.
>>>>
>>>>Thanks for helping
>>>>
>>>>--
>>>>
>>>>Arnaud GAND
>>>>SETI Ingénierie Conseil - Le DORAT
>>>>tel 05 55 60 65 59
>>>>fax 05 55 60 67 02
>>>>
>>>>
>>>>
>>>>--
>>>>Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
>>>>Bug reporting: http://cygwin.com/bugs.html
>>>>Documentation: http://cygwin.com/docs.html
>>>>FAQ: http://cygwin.com/faq/
>>>>
>>>>
>>--
>>
>>Arnaud GAND
>>SETI Ingénierie Conseil - Le DORAT
>>tel 05 55 60 65 59
>>fax 05 55 60 67 02
>>
>>
>>
>>
>>--
>>Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
>>Bug reporting: http://cygwin.com/bugs.html
>>Documentation: http://cygwin.com/docs.html
>>FAQ: http://cygwin.com/faq/
>>
>
--
Arnaud GAND
SETI Ingénierie Conseil - Le DORAT
tel 05 55 60 65 59
fax 05 55 60 67 02
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -