Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com> List-Archive: <http://sources.redhat.com/ml/cygwin/> List-Post: <mailto:cygwin AT cygwin DOT com> List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3D4A569A.2030208@seti-ic.com> Date: Fri, 02 Aug 2002 10:53:30 +0100 From: arnaud GAND <arnaud DOT gand AT seti-ic DOT com> Reply-To: arnaud DOT gand AT seti-ic DOT com Organization: SETI User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; fr-FR; rv:0.9.2) Gecko/20010726 Netscape6/6.1 X-Accept-Language: fr-fr MIME-Version: 1.0 To: "Harig, Mark A." <maharig AT idirect DOT net>, cygwin AT cygwin DOT com Subject: Re: Problem running cron References: <BADF3C947A1BD54FBA75C70C241B0B9E40F160 AT ex02 DOT idirect DOT net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit 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/