This chapter provides information and procedures for using the DB2 Query Patroller Recurring Query Scheduler window. The following topics are covered:
You can use the Recurring Query Scheduler window to schedule a recurring query for a specific date and time. The recurring query scheduler can also be used to schedule queries for a date range.
To access the DB2 Query Patroller Recurring Query Scheduler window, schedule a query as explained in the section Scheduling a Recurring Query.
The DB2 Query Patroller Recurring Query Scheduler window has four main sections:
The Recurring Query Scheduler window is illustrated below:
When you open the DB2 Query Patroller Recurring Query Scheduler window, a new, empty window displays. You can also open a previously saved schedule for a recurring query and perform the same functions as can be performed for a new query schedule. To open an existing schedule, select Open from the File drop-down list and select a path and file name.
The upper left portion of the DB2 Query Patroller Recurring Query Scheduler
window contains a panel of push buttons for setting the date range and
time. This panel contains three sets of push buttons: one for
setting the first date the query should run, one for setting the last date the
query should run, and one for setting the time of day the query should
start. The date range is in the format of month, day, and year.
The time push buttons are in the format of hour, minute, and an
a.m. or p.m. designator. These push buttons
are illustrated below:
To set a date and time for a recurring query, perform the following steps:
Note: | The default date is the current date. Queries scheduled before the current date are immediately submitted for processing. |
Note: | This date must be equal to or greater than the Range: From date. The default value is 12/31/2010. |
The perpetual calendar displays in the lower-right portion of the DB2 Query Patroller Recurring Query Scheduler window. The calendar contains the following features:
An example of the calendar is illustrated below:
You can click the arrow push buttons above the calendar to scroll through the calendar months. You can only scroll through the calendar months which fall between the selected Range: From and Range: To date values.
Calendar cells represent the days in the month. The table below
describes the various ways these cells can appear.
Icon | Description |
---|---|
| Normal. Day falls within date range and is not the current day. |
| Grayed. Day does not fall within date range and is not current day. |
| Current day. |
| Selected day. Cell is depressed and is darker than other cells. |
| Schedule gauge bar. A schedule guage bar indicates a scheduled query for this day. |
To schedule a query to run on a specific day in the perpetual calendar, perform the following steps:
The specified time displays in the field next to the Add>>> push button and the selected calendar day displays a schedule gauge similar to the one shown in the calendar cell icons table above.
To schedule a query to run for all days in a given date range, perform the following steps:
Note: | You can only schedule a query to recur for a maximum of 31 days. |
The Daily page displays as illustrated below:
All calendar days within the specified date range are displayed with schedule gauges and the time of query execution is displayed in the field next to the Add>> push button.
Use the Weekly page to schedule a query to run on a specific day and week in a month.
The Weekly page contains a weekly queries section that represents each day in the week. This page also contains radio buttons for selecting the time of month the query should be scheduled.
The weekly queries section and radio buttons work together to define when a recurring query will run. For example, if you clicked Mon in the weekly queries section and selected the First in Month radio button, the query is scheduled to run on the first Monday of each month in the date range you have specified. Selecting the Third in Month radio button schedules the query to run on the third Monday of each month in the date range you have specified. You can select any combination of radio buttons. Selecting the All in Month radio button causes all of the other radio buttons to be selected.
To schedule a query to recur weekly, perform the following steps:
The days that the query is scheduled to run are indicated in the perpetual calendar section by schedule gauges.
Use the Monthly page to schedule a query for a specific day for all months in a given date range. To schedule a query to recur monthly, perform the following steps:
The perpetual calendar displays a schedule gauge on the scheduled day for each month in the specified date range.
To schedule a query on the last day of the month, perform the following steps:
The last day of the month displays a schedule gauge and the scheduled query time displays to the right of the Add>> push button.
After scheduling a recurring query in the DB2 Query Patroller Recurring Query Scheduler window, you can save the schedule. You can use the same schedule for different queries. To save a query schedule, select Save from the File drop-down list.
Note: | Performing the Save function saves the schedule of dates; it does not schedule the queries in the DB2 Query Patroller system. |
After setting a recurring query schedule, you can send the schedule to the DB2 Query Patroller system for processing. To send a query schedule to the DB2 Query Patroller system, perform the following steps:
In addition to scheduling a new query, the Query Scheduler allows you to remove an existing recurring query.
To remove a scheduled query for a specific day in the calendar, perform the following steps:
The recurring query is removed from the selected day. The scheduled time for the query is no longer displayed in the Selected Times panel.
To remove a query scheduled to run at a specific time for all days in a given date range, perform the following steps:
On the Daily page, a schedule gauge displays on the Day push button. On the calendar, all days in the scheduled date range display schedule gauges.
The recurring query is removed from the schedule and the schedule gauges no longer appear.
To remove a recurring weekly query, perform the following steps:
On the Weekly page, a schedule gauge displays on the Weekly Queries push button and on the corresponding day in the perpetual calendar.
The scheduled weekly query is removed from the calendar and the schedule gauges no longer appear.
To remove a monthly recurring query, perform the following steps:
On the Monthly page, a schedule gauge displays on day of the recurring query. A schedule gauge appears on the corresponding day in the perpetual calendar.
The scheduled monthly query is removed from the calendar and the schedule gauge no longer appears.
To remove a scheduled query from the last day of the month, perform the following steps:
On the Last of Month page, a schedule gauge displays on the Last push button and on the last day of the month in the perpetual calendar.
The scheduled query is removed from the calendar and the schedule gauges no longer appear.
To view a report of all scheduled queries in a date range, select Print Preview from the File drop-down list.
While viewing the report, click one of the following push buttons: