Automated Report Generation
Goto the MOM Home Page
 
I’m looking for help in terms of scheduling report generation. I would like to run reports every Thursday that show performance for the 7 days previous but am unsure how the '\LASTWEEK' switch works.

Does this mean the report data generated will be for the Sunday - Sunday of the previous week? Is there a way (automated) to specify for which 7 days you'd like the data? For example I would like Wednesday – Wednesday.

From the microsoft.public.mom newsgroup
The default in the provided batch files is '
/LASTWEEK' which is literally "last week". If today is Wednesday, you will get a report for last week Sunday through Saturday. I have the same preference you do which is previous 7 days. The MOM help file includes the options for the '/DATERANGE' switch. I pasted them below for reference.

/DATERANGE:dates or /DR:dates
Specifies the dates for which to generate the specified report. The dates variable can be set to one of the following values:
  S=yyyy-mm-dd hh:mm E=yyyy-mm-dd hh:mm - Specifies the start and end date and time for the report.

  THISWEEK - Includes data from Sunday through Saturday of the current week.

  LASTWEEK - Includes data from Sunday through Saturday of the previous week.

  YESTERDAY - Includes data from the previous day.

  TODAY - Includes data from the current day.

  THISMONTH - Includes data from the first through last day of this month.

  LASTMONTH - Includes data from the first through last day of the previous month.

NOTE: If no other variables are used with the '
/DATERANGE' option the default values of 'S=1970-01-01' and 'E=[today's date]' are used.

/DAYS:n
Specifies the number of days of data to include in the specified report. This option is evaluated along with the start or end date specified with the /DATERANGE option. For example, this value specifies the number of days included in the report after the specified start date, or before the specified end date. If both a start and end date are specified, this option has no effect. If the /DATERANGE option is not specified, this option directs Microsoft Operations Manager 2000 to generate a report for the number of previous days specified. The n variable can be from 1 to 999.

For the past 7 days, you would not use /DATERANGE, but instead use /DAYS:7.
You should check the MOM online documentation for more details in case of omissions.
 

© FAQShop.com 2003 - 2008

Goto the MOM Home Page

Email the Author