D:\>at 20:20 /interactive /every:5 calc
Added a new job with job ID = 2
D:\Personal\perl\admin\tst>perl -w am.pl
==>0
==>1/8
Job 2 is calc
####
use strict;
use Win32::AdminMisc;
my $server="\\\\serverserversevverv";
my %JobInfo;
my $Day;
my @DOM;
my %Jobs;
my $Number;
Win32::AdminMisc::ScheduleList($server, \%Jobs);
print "==>".%Jobs."\n";
foreach $Number (keys(%Jobs)){
print "Job $Number is $Jobs{$Number}->{Command}\n";
if (Win32::AdminMisc::ScheduleGet($server, $Number, \%JobInfo)){
foreach $Day (1..31){
push(@DOM, $Day) if ($JobInfo{DOM} & 2**$Day);
}
print "This job will run on the following days of the month:\n";
print join(", ", @DOM);
}
}
##
##
D:\Personal\perl\admin\tst>perl -w am.pl
==>2/8
Job 2 is calc
This job will run on the following days of the month:
4Job 3 is calc
This job will run on the following days of the month:
4, 18