If you've upgraded your web browser since IE4.x, your machine no longer runs
the AT service;  instead, it runs the "Task Scheduler", a slightly different
beast of the same  stable.

The next link, contains useful information and a command-line tip on how to
restore the old AT scheduler:

http://www.ultratech-llc.com/KB/?File=TaskSched.TXT

Using the "Task Scheduler" has PROs and CONs: you submit jobs by using a
"Wizard", which takes very little time (I can't get it to take command-line
submitions). One of the cool things you can do with it is to submit jobs on
behalf of another username (you must know that username's password!).  

I've NEVER had problems submitting perl scripts to run as "batch jobs", as I
rely on it heavely on this functionality, for my administration duties.  I
simply wrap script invocation, in batch files, using full paths, like this:

        @echo off
        c:\perl\bin\perl.exe -w f:\your\dir\your-file.pl arg1 arg2 arg3 arg4
        c:\perl\bin\perl.exe -w d:\another\dir\another-file.pl arg1
        c:\perl\bin\perl.exe -w c:\dir\cleanup-file.pl arg1

Hope that helps...


-----Original Message-----
From: Cornish, Merrill [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 17, 2001 1:23 PM
To: Perl Win32 Users Mailing List (E-mail)
Subject: Running Perl Script with NT's AT Command


I need to automatically run a Perl script periodically on an NT machine.
So, I tried to used NT's AT command.  No luck.

I was careful, I believe, to avoid the usual traps of the environment being
different when run by the AT command versus when run by me from the command
line.

As a test, I have a script in "D:\Scripts\test.pl" which (by now) contains
nothing more than some Perl comment lines and some blank lines ending with 

        exit(0);

Using the AT command from the command prompt, I enter

 AT hh:mm "D:\Perl\bin\perl.exe D:\Scripts\test.pl"

where hh:mm is one minute in the future.  The request gets properly recorded
as demonstrated by executing AT without arguments.  However, when the
specified time rolls around and I do the AT command again without arguments,
the word "Error" appears the status of the requested execution.

I ran these tests logged as as the administrator.

As someone's suggestion, I also tried running with the /INTERACTIVE switch,
but still nothing appeared.

Any ideas?

Merrill
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to