If your target systems are NT/2k/XP, and the scheduler service is running,
you can run something via the scheduler service.
Here's a snippet that schedules something to run 2 minutes from now:
my $offset = CalcOffset($host); # delta (seconds) of remote TZ
if( $offset == -1 ) {
$mesg .= "Could not calculate TZ delta for $host\n";
return;
}
my $DOM = 0;
my $DOW = 0;
my $flags = JOB_ADD_CURRENT_DATE;
my $cmd = "c:\\perl\\bin\\perl.exe c:\\myperlprog.pl";
my $Time = Win32::AdminMisc::GetTOD("\\\\$host") + 120 + $offset;
my $job = Win32::AdminMisc::ScheduleAdd("\\\\$host", $Time, $DOM,
$DOW, $flags, $cmd);
############################################################################
##############
#
# Subroutine CalcOffset
# Calculates the number of seconds difference between the local time of this
system and
# the local time of the remote server.
#
############################################################################
##############
sub CalcOffset {
my $remote = shift;
my %info_local;
my %info_remote;
Win32::Lanman::NetRemoteTOD("", \%info_local) or return -1;
Win32::Lanman::NetRemoteTOD($remote, \%info_remote) or return -1;
return 60 * ($info_local{timezone} - $info_remote{timezone});
}
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:Mike_Sullivan@;Dennys.com]
Sent: Wednesday, October 16, 2002 6:34 AM
To: [EMAIL PROTECTED]
Subject: Remotely run perl
Does anyone know how I can remotely run a perl script without using a web
server? I have an application that needs to send out alerts to a few
systems. I have a perl script that will execute the wav file. It works
like a charm through IIS but I don't want to install IIS on all the
systems. Any help would be appreciated.
Thanks
Mike
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs