# Administrator Guide

# Automating Administrative Tasks

This chapter provides the steps you take to set up the Automation Service and schedule jobs that perform routine portal administration tasks. It includes the following sections:

- About Jobs
- Registering Automation Services
- Setting Up Job Folders
- Starting the BEA ALI Automation Service
- Running Portal Agents
- Creating and Running Jobs
- Configuring External Operations to Run as Jobs
- Reviewing Jobs Status and Job Logs

## About Jobs

Jobs allow you to schedule portal management operations. A job is a collection of related operations. Each operation is one task, such as a crawl for documents, an import of users, or one of the system maintenance tasks.

You must run jobs to perform the following actions:

- Import or synchronize users and groups through an authentication source
- Import or refresh documents through a content crawler
- Perform external operations
- Run and store content for some portlets
- Import user information through a profile source
- Move or copy content through a smart sort (the portal creates and runs the job automatically)

## Registering Automation Services

The Automation Service must be registered with the portal before you can run jobs. The primary Automation Service is registered when you install the Automation Service and execute the related database scripts described in the Installation and Upgrade Guide for AquaLogic Interaction.

To register additional Automation Services:

1. Click Administration.
2. In the Select Utility drop-down list, click Automation Service.
3. Click Add Automation Service.
4. Complete the configuration according to the online help.
5. Click Finish. Note that you cannot run jobs on this Automation Service until you assign job folders to it.

## Setting Up Job Folders

Jobs can run only if the folder in which they are stored is assigned to an Automation Service. All of the jobs in a folder are run by one or more Automation Services. If multiple Automation Services are associated with a single folder, the BEA ALI Automation Service assigns jobs according to the resources available on each Automation Service.

To manage folder assignment for an Automation Service:

1. Click Administration.
2. In the Select Utility drop-down list, click Automation Service.
3. Click the name of the Automation Service to which you want to assign folders.
4. Add or remove folders as necessary.
5. Click Finish.

## Starting the BEA ALI Automation Service

The Automation Service runs as a Windows service. Ensure the BEA ALI Automation Service is configured to start automatically when you boot your system. For information on configuring the BEA ALI Automation Service to start automatically, see the Installation and Upgrade Guide for AquaLogic Interaction.

## Running Portal Agents

The portal comes with four jobs that are created upon installation. Two other jobs are created when you perform bulk subscriptions or create dynamic group membership rules. All these jobs are stored, by default, in the Jobs folder under the Intrinsic Operations folder in Administration:

- The Audit Log Management Agent archives old audit messages into files and deletes old audit files.

The Audit Log Management Agent also archives and deletes audit files according to the schedule set in the Audit Manager utility.

- The Bulk Subscriptions Agent subscribes users in bulk to the communities and portlets you specify in the Bulk Add editor.
- The Document Refresh Agent performs background maintenance on your Knowledge Directory, such as refreshing document links and properties, and deleting expired documents.
- The Dynamic Membership Update Agent updates dynamic portal group memberships.
- The Search Update Agent makes sure the search collection is synchronized with the database. You can run multiple instances of this job at the same time.

The Search Update Agent also repairs the search index according to the frequency set in the Search Service Manager utility.

- The Weekly Housekeeping Agent performs weekly housekeeping on your system, such as deleting expired invitation codes and old job logs and removing community members who no longer have access to a community.

To run these agents, click the job, and schedule it.

## Creating and Running Jobs

When you create portal objects that require related jobs, the Create Object editor includes a page to configure and schedule the related job. If you want to create additional jobs independently of the Create Object editors, follow the instructions in this section.

To create and run a job:

1. Click Administration.
2. Open an administrative folder.
3. In the Create Object drop-down list, click Job.
4. Define your job as described in the online help.
5. Click Finish.

Before you can run jobs, you must:

1. Confirm that the BEA ALI Automation Service is running on the Automation Service machine. If it is not running, start it now, as described in Starting the BEA ALI Automation Service.
2. Register the Automation Service with the portal, as described in Registering Automation Services.
3. Assign administrative folders to the registered Automation Services, as described in Setting Up Job Folders.

## Configuring External Operations to Run as Jobs

An external operation allows you to run command-line actions through the portal and schedule these actions through portal jobs. For example, you might want to create scripts that query documents, ping portals, e-mail snapshot query results to users, or any custom script on a specified schedule.

To create an external operation:

1. Click Administration.
2. Open an administrative object folder.
3. In the Create Object drop-down list, click External Operation.
4. Define your external operation and related job as described in the online help.
5. Click Finish.

The portal includes two example external operations in the Admin Objects - Intrinsic Operations folder:

- Saved Search Mailer: This is a sample external operation that e-mails the results of snapshot queries to users. For details on customizing this script, see the comments in the PT_HOME/scripts/SavedSearchMailer.sh file invoked by the Saved Search Mailer operation.
- Weekly Search Log Report: This is an external operation that runs a summary report of the Search Service logs for the previous week, or you can configure it to report on the period you want. For details on customizing this script, see the comments in the PT_HOME/scripts/WeeklySearchLogReport.sh file invoked by the Weekly Search Log Report operation.

## Reviewing Jobs Status and Job Logs

The Job History page of the Automation Service utility provides information about in-process and completed jobs as well as an option to abort jobs.

To view status and logs for in-process and completed jobs:

1. Click Administration.
2. In the Select Utility drop-down list, click Automation Service.
3. On the left, under Edit Utility Settings, click Job History.
4. View the history of jobs that have run and the logs for individual jobs or abort in-process jobs.
5. Click Finish.