7. OpenLane Maintenance
Generating Scheduled Reports
To generate scheduled reports, run the processreports function of OLCmd.
The processreports application can generate reports based on a date range. This allows, for example, several days’ worth of reports to be generated at once. processreports also allows one customer, a list of customers, or all customers to be specified for report generation. For more information, see Appendix A, OLCmd Reference.
Automating the Generation of Scheduled Reports
To automate running scheduled reports (and other periodic processes), use the scheduler for the platform where OpenLane was installed. This is typically cron for Solaris platforms and at for Windows NT. The scheduler runs the ProcessReports command line program at the times or intervals specified by the scheduler.
Using Cron Under Solaris to Automate Reports
Procedure
1.Using a text editor, create a shell script in the /opt/pdn/OpenLane directory that contains the commands you would ordinarily use to generate reports. For example, to create reports for all customers, add the following commands:
cd /opt/pdn/OpenLane
.OLCmd processreports
2.Save the script. In this example, the script is called MyReports.sh.
3.Make the file executable: chmod 777 MyReports.sh
4.Open the crontab for edit: crontab
5.Add a line to the end of the crontab file for the shell script. Each line of the crontab consists of six fields:
—Minute
—Hour
—Day of Month (1–31)
—Month
—Day of Week
—Command to be executed
Lists, ranges, and asterisks (meaning all legal values) are allowed.
For example, to execute MyReports.sh every weekday
0 0,12 * * 1-5 /opt/pdn/OpenLane/MyReports.sh
January 2002 |