delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/01/14/23:03:12

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
From: "David Christensen" <dpchrist AT holgerdanske DOT com>
To: "'The Cygwin Mailing List'" <cygwin AT cygwin DOT com>
References: <042e01c85671$6aa39de0$0a00a8c0 AT a64x23800p> <C440775DE111CD47B341A35CF512425D03FD4AAE AT auntm231 DOT apac DOT corp DOT eds DOT com>
Subject: RE: Running perl script in cron in cygwin under Windows
Date: Mon, 14 Jan 2008 20:02:23 -0800
Message-ID: <009001c8572b$71b77d80$0a00a8c0@a64x23800p>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 11
In-reply-to: <C440775DE111CD47B341A35CF512425D03FD4AAE@auntm231.apac.corp.eds.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

Macalalad, Jun wrote:

> Thanks David. 
> Thanks again for the help

You're welcome.  :-)  Please help someone else if/when you have the chance.
Please keep this thread on the Cygwin list so other people can find it (e.g.
hit "Reply to All").


> Cron works on other scripts but not with a perl script. If it's the
> environment (we are running korn instead of the bash default), it
> might be good to create a wrapper script in korn shell.

It's been a while since I used the Korn shell, but I seem recall that it
also processed a profile script for interactive logins (.profile?).  You
should read the Korn shell manual page to find out and/or get a copy of the
O'Reilly book (I have one and it was very helpful when I was using the Korn
shell):

	http://www.oreilly.com/catalog/korn2/index.html


> Does cron use bash default profile for the login to run?  That could
> be the key.

It's also been a while since I had to solve cron problems, but I believe
cron doesn't use any shell -- it just launches whatever program and
arguments you feed it (via one of the exec() calls?).  So if you want to run
shells, scripts, etc., you have to do whatever set up your code expects.  


HTH,

David


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019