This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Problem running cron


Arnaud, 
on thing is not completely clear to me:
Is it correct the NT program creates an extra window
for log messages? This is at least
what I understood from your mail. If yes, this is the problem

Cron has no rights to access the desktop, and I believe
the NT program has not if started from cron. If you
have inetd running, you may try to telnet into your
box, start the NT program and see if it fails. If so,
see
http://sources.redhat.com/ml/cygwin/2001-07/msg00641.html
for a possible way to fix this.

Ciao
Tom


> -----Original Message-----
> From:	arnaud GAND [SMTP:arnaud.gand@seti-ic.com]
> Sent:	Friday, August 02, 2002 12:34 PM
> To:	Demmer, Thomas; cygwin@cygwin.com
> Subject:	Re: Problem running cron
> 
> 
> 
> 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
> 
> >>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@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'
> >>
> >>>
> 
> 

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]