Generating scheduled reports, Automating the generation of scheduled reports, Using cron under solaris to automate reports – Paradyne OpenLane SLM 5.5 User Manual

Page 58: Generating, Scheduled reports

Advertising
background image

7. OpenLane Maintenance

7-6

January

2002

7800-A2-GB32-00

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 -e

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 (0–59)

Hour (0–23)

Day of Month (1–31)

Month (1–12)

Day of Week (0–6, where 0 is Sunday and 6 is Saturday)

— Command to be executed

Lists, ranges, and asterisks (meaning all legal values) are allowed.

For example, to execute MyReports.sh every weekday (1-5) at midnight and
noon (0,12), a correct crontab entry is:

0 0,12 * * 1-5 /opt/pdn/OpenLane/MyReports.sh

Advertising