* RE: How to schedule scripts
@ 2002-11-06 14:18 Gen Zhang
0 siblings, 0 replies; 3+ messages in thread
From: Gen Zhang @ 2002-11-06 14:18 UTC (permalink / raw)
To: cygwin
I'd recommend using the command of bash --login -c <your script>. This
way, all the paths needed by perl, mailer, etc. are set up by the
.profile as it would be. You're not opening this thing load of times per
minute, so the performance shouldn't matter so much.
Just my two pence.
Genneth
> -----Original Message-----
> From: Max Bowsher [mailto:maxb@ukf.net]
> Sent: 05 November 2002 22:32
> To: Stan Horwitz; cygwin@cygwin.com
> Subject: Re: How to schedule scripts
>
> Stan Horwitz <stan@temple.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/
--
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to schedule scripts
2002-11-05 14:07 Stan Horwitz
@ 2002-11-05 14:32 ` Max Bowsher
0 siblings, 0 replies; 3+ messages in thread
From: Max Bowsher @ 2002-11-05 14:32 UTC (permalink / raw)
To: Stan Horwitz, cygwin
Stan Horwitz <stan@temple.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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* How to schedule scripts
@ 2002-11-05 14:07 Stan Horwitz
2002-11-05 14:32 ` Max Bowsher
0 siblings, 1 reply; 3+ messages in thread
From: Stan Horwitz @ 2002-11-05 14:07 UTC (permalink / raw)
To: cygwin
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-11-06 22:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-06 14:18 How to schedule scripts Gen Zhang
-- strict thread matches above, loose matches on Subject: below --
2002-11-05 14:07 Stan Horwitz
2002-11-05 14:32 ` Max Bowsher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).