ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/reports/DBReporter2/DBReporterMain.java
Revision: 1.2
Committed: Sat Feb 3 17:26:07 2001 UTC (23 years, 9 months ago) by pjm2
Branch: MAIN
Changes since 1.1: +5 -1 lines
Log Message:
Fixed the runnaway memory problem.

File Contents

# User Rev Content
1 pjm2 1.1 import java.sql.*;
2     import java.io.*;
3    
4 pjm2 1.2 // Main method to run the reports.
5 pjm2 1.1 public class DBReporterMain {
6    
7     public static void main(String[] args) {
8    
9     long endTime = DateUtils.startOfToday();
10 pjm2 1.2
11     // Uncomment next line to go back in time...
12     //endTime = DateUtils.subtractDays(endTime, 2);
13    
14 pjm2 1.1 long startTime = DateUtils.subtractDays(endTime, 1);
15    
16     DBReporter reporter = new DBReporter(startTime, endTime);
17    
18     ReportList reportList = null;
19     try {
20     reportList = new ReportList("report_list.txt");
21     }
22     catch (IOException e) {
23     System.out.println(e);
24     return;
25     }
26    
27     try {
28     reporter.runReports(reportList);
29     }
30     catch (SQLException e) {
31     System.out.println("Fatal SQL errors - Cannot complete reports: " + e);
32     }
33     catch (Exception e) {
34     System.out.println("Fatal errors - Cannot complete reports: " + e);
35     }
36    
37     System.out.println("DBReporterMain finished.");
38    
39     }
40    
41     }