Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Subject: RE: Problem running runmqsc from cron
Date: Mon, 24 May 2004 08:37:44 +0200
Message-ID: <A2AE62FF85AEAC4BA3DE695E3C237D11B34B6D@exmid04.africa.enterprise.root>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
From: "Mike Kenny - BCX - Mngd Services" <Mike.Kenny@bcx.co.za>
To: "Harig, Mark" <maharig@idirect.net>, <cygwin@cygwin.com>
X-OriginalArrivalTime: 24 May 2004 06:37:45.0714 (UTC) FILETIME=[9F80F520:01C44159]
X-IsSubscribed: yes
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id i4O6bqZo025557

> > I have written a number of scripts to monitor queue depth and 
> > channel status on my MQ server. These work fine from the 
> > command line, but when I try to execute them from cron the 
> > sciripts are executed, but the runmqsc command reports that 
> > it can't connect to the queue manager. Has anybody come 
> > across this or similar problems? If so how were they 
> > resolved? (I hace searched the archives, but can find no 
> > reference to this type of problem)
> > 
> 
> You might try examining your environment variables:
> 
>   * * * * * /usr/bin/env > /tmp/env.txt
> 
> The environment variable settings that are set by
> default within cron is a limited set.  For more
> information, see "man 5 crontab".
> 

Thanks Mark. I had actuallly dumped my environment from within cron
and compared it. It seemed OK. I found an explanation of the problem
by googling. For those who may be interested, the issue is that cron has
to su to execute the jobs for each user. As cygwin is cannot use NT to
authenticate the user, any job that is going to be executed on behalf
of that user must not use any resource that will require authentication.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


