delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/05/14/13:13:13

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
Date: Tue, 14 May 2002 19:11:50 +0200
From: "Gerrit P. Haase" <gerrit AT familiehaase DOT de>
Reply-To: "Gerrit P. Haase" <gerrit AT familiehaase DOT de>
Organization: Esse keine toten Tiere
X-Priority: 3 (Normal)
Message-ID: <197368213082.20020514191150@familiehaase.de>
To: "Harig, Mark A." <maharig AT idirect DOT net>
CC: cygwin AT cygwin DOT com
Subject: Re: Cron problem
In-Reply-To: <BADF3C947A1BD54FBA75C70C241B0B9E40EFDB@ex02.idirect.net>
References: <BADF3C947A1BD54FBA75C70C241B0B9E40EFDB AT ex02 DOT idirect DOT net>
MIME-Version: 1.0

Mark schrieb:

> Give me simple one or two-line perl scripts that duplicate your problem
> and I will try them.  The scripts should just print the working
> directory or the date or something simple like that.  It sounds like a
> PATH problem or a mount-point problem or the startup mode of cron.  Is
> CYGWIN="binmode ntfs tty"?

Yep (ntsec;).


script1.pl:
#!/usr/bin/env perl
$cmd = "perl /path/script2.pl";
system $cmd;
1;

script2.pl:
#!/usr/bin/env perl
print "I'm script two.\n"
1;

crontab -e:
MAILTO=your AT address DOT here
1 * * * * /usr/bin/perl /path/script1.pl

Put both scripts in /path no mounts are involved.
The mail from Cron:
Can't open perl script "/path/script2.pl": No such file or directory

It seems to be the problem that I didn't used an absolute path to perl
in script1.pl.
It works ok. if I change it to /usr/bin/perl.
It seems that Cron is running the wrong perl.  I need to fix my path.


Thanks for your help,

Gerrit
-- 
=^..^=


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


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