
Chapter 3. Working with scheduled custom reports 37
$dest[1] = '<?xml:stylesheet type="text/xsl"
href="c:\Scripts\Report_script\reports.xsl"?>' . "\n";
for ($index=2; $index < @source; $index++) {
$oldind = $index-1;
$dest[$index] = $source[$oldind];
}
open (FILE, "$FileName") || die "Cannot open $FileName: $!\n";
print FILE @dest;
close(FILE);
sub get_timestamp {
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime($_[0]);
$year += 1900;
$mon=$mon+1;
return "$mon$mday$hour$min";
}
3.2 Adding a script package to Operations Manager
After having the package.xml and the script file ready, add it to a zip file named package.zip
and do the followin ...