How to schedule scripts

Stan Horwitz stan@temple.edu
Tue Nov 5 14:07:00 GMT 2002


Hello all;

I am new to Cygwin and I searched through the www.cygwin.com web site, but
I found nothing that explains how to schedule scripts written under Perl
in the Cygwin environment on a Windows 2000 Advanced Server system.

In my effort to migrate some Perl scripts from a Unix system to this
particular Windows server, I wrote a Perl script that works fine when I
run it as Administrator in a Cygwin window with the default shell
environment. This script generates a text file that contains a report.
This script then moves the output report file into this Windows server's
mail distribution directory where it is then successfully emailed. No
interactive output is generated by this script. The file containing this
script is called "daily.pl".

Now, I want to schedule this 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.

Before posting this message, I searched through this list's archives for
information about this particular problem, but I came up empty-handed.


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



More information about the Cygwin mailing list