delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/11/05/17:32:45

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: <010901c2851b$32058930$78d96f83@pomello>
From: "Max Bowsher" <maxb AT ukf DOT net>
To: "Stan Horwitz" <stan AT temple DOT edu>, <cygwin AT cygwin DOT com>
References: <Pine DOT OSF DOT 4 DOT 32 DOT 0211051644100 DOT 25997-100000 AT typhoon DOT ocis DOT temple DOT edu>
Subject: Re: How to schedule scripts
Date: Tue, 5 Nov 2002 22:32:16 -0000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

Stan Horwitz <stan AT temple DOT edu> wrote:

> Now, I want to schedule this [perl] script to run once a day as
> Administrator. With that in mind, I created a request under Windows'
> Task scheduler, but when the scheduled time occurred, a Cygwin shell
> window opened up, but nothing else happens. The request I scheduled
> was "cygwin daily.pl; exit" but the "daily.pl" script never executes;
> nor does "exit". As such, I end up with a Window to a Cygwin shell on
> my screen.

"cygwin" is of course "cygwin.bat". If you look at it, you will see that it
doesn't make any attempt to pass args on to the shell.
But you don't want a shell anyway. Just invoke perl directly: "perl
/full/path/to/daily.pl". Of course you will need C:\cygwin\bin, or the
equivalent on your system, in PATH (either the system-wide setting, or the
user the script will run as), so that perl can be found, and it in turn can
find DLLs that it needs.

Max.


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