DB2 10.5 for Linux, UNIX, and Windows

Adding a task to the administrative task scheduler

You can use the ADMIN_TASK_ADD procedure to define new scheduled tasks. The parameters that you use when you call the procedure define the schedule and the work for each task.

Before you begin

Restrictions

Procedure

  1. Connect to the database.
  2. If the task calls a user-defined procedure, issue the appropriate CREATE PROCEDURE statement.
  3. Determine the schedule for when and how often you want the task to be executed.
  4. Call the ADMIN_TASK_ADD procedure to schedule the task.
  5. Commit the changes.

Results

Every five minutes the administrative task scheduler connects to active databases to check for new or updated tasks. It then adds or updates the tasks in the scheduler task lists. At the same time, the scheduler analyzes the task to schedule its next execution.

To retrieve information about the newly created task, use the ADMIN_TASK_LIST administrative view.