ii

Editing the Batch File

For each job, the Scheduler creates a batch file, which is stored in the …\Usage Analyst\Schedule directory. Here’s what a typical batch file might look like:

REM MARKETFOCUS START DO NOT MODIFY
REM MARKETFOCUS SCHEDULER BATCH FILE-- DO NOT MODIFY IN
REM MARKETFOCUS BETWEEN COMMENTS
REM MARKETFOCUS CREATED 4/11/97 4:38:08 PM
REM MARKETFOCUS ACTIVE False
REM MARKETFOCUS OCCURS 2
REM MARKETFOCUS DAYS 7
REM MARKETFOCUS TIME 12:00:00 AM
SET IMPORT="C:\Program Files\Usage Analyst\IMPORT.EXE"
SET ANALYSIS="C:\Program Files\Usage Analyst\ANALYSIS.EXE"
SET METADATA="C:\Program Files\Usage Analyst\METADATA.EXE"
SET MAIL="C:\Program Files\Usage Analyst\UTILITY\MAIL.EXE"
REM MARKETFOCUS END DO NOT MODIFY
This section imports a log file into the Access database. The log file is being accessed from the local file system.
REM MARKETFOCUS START DO NOT MODIFY
REM MARKETFOCUS TASK "Import"
%IMPORT% -silence messagelog="C:\Program Files\Usage Analyst\Message\MUA$M$Y.log" db="C:\Program Files\Usage Analyst\MSUsage.mdb" log="G:\LogFiles\in$i.log" logsource="LogSource1"
REM MARKETFOCUS END DO NOT MODIFY

This section performs title lookups.

REM MARKETFOCUS START DO NOT MODIFY
REM MARKETFOCUS TASK "Title lookup"
%IMPORT% -silence messagelog="C:\Program Files\Usage Analyst\Message\MUA$M$Y.log" db="C:\Program Files\Usage Analyst\MSUsage.mdb" titles='Title=""'
REM MARKETFOCUS END DO NOT MODIFY

This section performs the IP address resolution.

REM MARKETFOCUS START DO NOT MODIFY
REM MARKETFOCUS TASK "IP resolution"
%IMPORT% -silence messagelog="C:\Program Files\Usage Analyst\Message\MUA$M$Y.log" db="C:\Program Files\Usage Analyst\MSUsage.mdb" action="IP resolution"
REM MARKETFOCUS END DO NOT MODIFY

This section performs the Whois lookup.

REM MARKETFOCUS START DO NOT MODIFY
REM MARKETFOCUS TASK "Whois lookup"
%IMPORT% -silence messagelog="C:\Program Files\Usage Analyst\Message\MUA$M$Y.log" db="C:\Program Files\Usage Analyst\MSUsage.mdb" action="Who is"
REM MARKETFOCUS END DO NOT MODIFY

This section prepares the executive summary report.

REM MARKETFOCUS START DO NOT MODIFY
REM MARKETFOCUS TASK "Analysis"
%ANALYSIS% -silence messagelog="C:\Program Files\Usage Analyst\Message\MUA$M$Y.log" db="C:\Program Files\Usage Analyst\MSUsage.mdb" report="C:\Program Files\Usage Analyst\Reports\executive_summary.htm" analysis="C:\Program Files\Usage Analyst\Catalog\Summary\Executive summary.mfa"
REM MARKETFOCUS END DO NOT MODIFY

This section prepares the request detail report.

REM MARKETFOCUS START DO NOT MODIFY
REM MARKETFOCUS TASK "Analysis"
%ANALYSIS% -silence messagelog="C:\Program Files\Usage Analyst\Message\MUA$M$Y.log" db="C:\Program Files\Usage Analyst\MSUsage.mdb" report="C:\Program Files\Usage Analyst\Reports\request detail.htm" analysis="C:\Program Files\Usage Analyst\Catalog\Summary\Request detail.mfa"
REM MARKETFOCUS END DO NOT MODIFY

This section deletes old data.

REM MARKETFOCUS START DO NOT MODIFY
REM MARKETFOCUS TASK "Delete data over 6 months old"
%IMPORT% -silence messagelog="C:\Program Files\Usage Analyst\Message\MUA$M$Y.log" db="C:\Program Files\Usage Analyst\MSUsage.mdb" delete="Date>ThisMonth-6"
REM MARKETFOCUS END DO NOT MODIFY

This section compacts the Access database.

REM MARKETFOCUS START DO NOT MODIFY
REM MARKETFOCUS TASK "Compact database"
%IMPORT% -silence messagelog="C:\Program Files\Usage Analyst\Message\MUA$M$Y.log" sourcedb="C:\Program Files\Usage Analyst\MSUsage.mdb" destdb="C:\Program Files\Usage Analyst\temp.mdb"
REM MARKETFOCUS END DO NOT MODIFY

In addition to the commands that the Scheduler adds to the batch file, you can add commands to perform other operations. For example, you can add commands to copy a log file from a web server to the computer where Usage Import and the Report Writer are running.

For more information about batch-file commands that are not part of Usage Import and the Report Writer, refer to your Windows NT 4.0 operating system documentation.

To edit the batch file

  1. With the right mouse button, click on the job whose batch file you want to edit.
  2. On the menu that appears, choose Edit Batch File.

The batch file appears in a WordPad window.

Note
Do not edit any lines in groups that begin with "REM MARKETFOCUS START DO NOT MODIFY" and end with "REM MARKETFOCUS END DO NOT MODIFY." Changes in those groups will be lost the next time you open Scheduler.


© 1996-1997 Microsoft Corporation. All rights reserved.