Skip Headers
Oracle® Fusion Middleware Administrator's Guide for Oracle WebCenter Interaction
10g Release 4 (10.3.3.0.0)

Part Number E14107-05
Go to Documentation Home
Home
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

11 Automating Administrative Tasks

This chapter describes 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

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:

About Portal Agents

The portal comes with several operations that can only be accessed through the jobs with which they are associated. These special operations are referred to as agents.

The following agent jobs are stored, by default, in the Intrinsic Operations portal folder:

About Running Scripts Through the Portal with External Operations

An external operation enables you to run shell scripts (for example, .sh or .bat files) through the portal and schedule these actions through portal jobs. For example, you might want to create a script that queries documents, pings portal servers, e-mails snapshot query results to users, or runs some other custom job, then create an external operation that points to the script, and use a job to run the script on a specified schedule.

External Operations Created Upon Installation

When you install the portal, there are two working example external operations that are created in the Intrinsic Operations portal folder:

  • Bulk Subscriber: This external operation subscribes users to communities and groups when you use bulk add.

  • Snapshot Query Mailer: This is a sample external operation that e-mails the results of snapshot queries to users.

    For more information on this external operation, see E-mailing the Results of a Snapshot Query.

Working with External Operations

This section describes the following tasks:

Creating or Editing External Operations

To create an external operation you must have the following rights and privileges:

  • Access Administration activity right

  • Create External Operations activity right

  • At least Edit access to the parent folder (the folder that will store the external operation)

  • At least Edit access to the job that will run this external operation

To edit an external operation you must have the following rights and privileges:

  • Access Administration activity right

  • At least Edit access to the external operation

  • If you plan to change the job that will run this external operation, at least Edit access to the job

Note:

  • Because the standard error output from the command or script is captured to the job log, avoid the use of new shells, redirects, and pipes.

  • Passing arguments to cmd or start in shell programs might disable the time-out mechanism.

  • When you are extending scripts in the External Operation Editor, carefully consider all potential effects of the scripts. Ensure that your script does not introduce a security risk.

To create or edit an external operation:

  1. Click Administration.

  2. Open the External Operation Editor.

    • To create an external operation, open the folder in which you want to store the external operation. In the Create Object list, click External Operation.

    • To edit an external operation, open the folder in which the external operation is stored and click the external operation name.

  3. In the Operating System Command box, type the relative path and file name of the script enclosed in quotes (“).

    Note:

    All external operation scripts must reside in the scripts directory of each of the Automation Services that will run them. The scripts directory is located on the computer that hosts the Automation Service, in the Oracle WebCenter Interaction installation directory (for example, C:\Oracle\Middleware\wci\ptportal\scripts for Windows or /oracle/middleware/wci/ptportal/scripts for UNIX or Linux). The Automation Service will not run any scripts that are not in this directory.

    The following tokens in the command line will be substituted:

    • names of environment variables surrounded with percent signs (%)

    • <user_id>

    • <security_token>

    • <job_id>

    • <operation_id>

    • <last_job_runtime>

    Expanded tokens that contain spaces or special characters which are not surrounded with quotes (“) are enclosed in quotes automatically.

  4. In the Time-out in seconds box, type the number of seconds after which, if this operation is still running, you want the job to stop.

    If you do not want to set a time-out, leave this setting at 0 (infinite).

To run this operation, you must associate it with a job and schedule the job to run.

Deleting an External Operation

To delete an external operation you must have the following rights and privileges:

  • Access Administration activity right

  • Admin access to the external operation

To delete an external operation:

  1. Click Administration.

  2. Navigate to the external operation.

  3. Select the external operation you want to delete and click the delete icon.

Working with Automation Services and Jobs

This section describes the following main tasks:

It also covers the following low-level tasks:

Starting the Oracle WCI Automation Service

The Automation Service runs as a Windows service or a daemon. Ensure the Oracle WCI Automation Service is configured to start automatically when you start your system. For information on configuring the Oracle WCI Automation Service to start automatically, see the Oracle Fusion Middleware Installation Guide for Oracle WebCenter Interaction for Windows or the Oracle Fusion Middleware Installation Guide for Oracle WebCenter Interaction for Unix and Linux.

Registering Automation Services

Before you can run jobs, you must register any computers hosting Automation Services and register job folders with those Automation Services. The primary Automation Service is registered when you install the Automation Service and execute the related database scripts described in the Oracle Fusion Middleware Installation Guide for Oracle WebCenter Interaction for Windows or the Oracle Fusion Middleware Installation Guide for Oracle WebCenter Interaction for Unix and Linux.

To access the Automation Service Utility you must be a member of the Administrators Group.

To register automation services:

  1. Click Administration.

  2. In the Select Utility list, click Automation Service.

  3. Click Add Automation Service.

    The Register Automation Service dialog box opens.

  4. Type the name of the computer that hosts the Automation Service.

    Use the host name only (for example, automationserver1), not the fully qualified domain name.

  5. Type the network address that identifies the computer.

  6. Click Finish.

The new Automation Service appears in the list. To the right of each Automation Service, you can see if the server is online or offline and when the job folders associated with the server were last updated.

You must assign job folders to this Automation Service before you can run jobs with it.

Registering Job Folders with Automation Services

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 Oracle WCI Automation Service assigns jobs according to the resources available on each Automation Service.

To access the Automation Service Utility you must be a member of the Administrators Group.

Note:

You must register each folder separately. An Automation Service does not monitor child folders of registered folders.

To register a job folder with an automation service:

  1. Click Administration.

  2. In the Select Utility list, click Automation Service.

  3. Click the name of the Automation Service to run the jobs.

    The Register Folders Editor opens.

  4. Click Add Folder.

    The Add Job Folder dialog box opens.

The job folder appears in the list. Under each registered job folder, you can see the jobs stored in that folder and the next time each job is scheduled to run.

  • To edit a job, click its name.

  • To remove a job folder, select the folder and click the Remove icon.

    To select or clear all of the folder check boxes, select or clear the box to the left of Folders.

Creating or Editing a Job

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

Before you can run jobs, you must:

To create a job you must have the following rights and privileges:

  • Access Administration activity right

  • Create Jobs activity right

  • At least Edit access to the parent folder (the folder that will store the job)

  • At least Select access to any objects or operations you want to add to the job

To edit a job you must have the following rights and privileges:

  • Access Administration activity right

  • At least Edit access to the job

  • If you plan to change the objects or operations associated with the job, at least Select access to those objects or operations

To create or edit a job:

  1. Click Administration.

  2. Open the Job Editor.

    • To create a job, open the folder in which you want to store the job. In the Create Object list, click Job.

      Note:

      The folder in which you store the job must be registered with an automation service to run the job.

    • To edit a job, open the folder in which the job is stored and click its name.

  3. On the Main Settings page, perform tasks as necessary:

  4. On the Job History page, perform tasks as necessary:

  5. On the Properties and Names page, perform tasks as necessary:

  6. On the Security page, perform tasks as necessary:

    The default security for this job is based on the security of the parent folder. Administrative users with at least Select access to this job can associate objects with the job.

  7. If you are editing a remote pagelet Web service, on the Migration History and Status page, perform tasks as necessary:

    Note:

    The Migration History and Status page is not available when creating an object.

Deleting a Job

To delete a job you must have the following rights and privileges:

  • Access Administration activity right

  • Admin access to the job

To delete a job:

  1. Click Administration.

  2. Navigate to the job.

  3. Select the job you want to delete and click the delete icon.

Adding Operations to a Job

To associate an operation with a job:

  1. If the Job Editor is not already open, open it now.

  2. Under Add an Operation, perform the following actions:

    • To run operations with this job, click Add Operation; then, in the Select Job Operations dialog box, select the operations you want to add and click OK.

    • Each time this job runs, each of these operations is executed, in order, starting at the top of this list. Because the operations run in the order listed (one operation must complete before another begins), you might have to change this order. For example, you might want to run an authentication source operation to import new users and then run a profile source operation to import profile information for those new users.

      To change the order of operations, perform the following actions:

      • To move an operation to the top of this list, click the move to top icon.

      • To move an operation up one space in this list, click the move up icon.

      • To move an operation down one space in this list, click the move down icon.

      • To move an operation to the bottom of this list, click the move to bottom icon.

    • To remove an operation, select the operation and click the remove icon.

      To select or clear all of the operation check boxes, select or clear the check box to the left of Operations.

Scheduling a Job to Run

To schedule a job to run:

  1. If the Job Editor is not already open, open it now.

  2. Under Schedule, specify when you want this job to run:

    • If you do not want to run this job, leave the default setting (Unscheduled).

    • If you want to run this job immediately, choose Run Once - Now.

    • If you want to run this job at a specified date and time, choose Run Once. By default, the date and time are set to the current date and time. To change this setting, type a different date and time in the appropriate boxes. To choose the date from a calendar, click the calendar icon. After this job completes, it resets itself to Unscheduled.

    • If you want to run this job on a regular basis, choose Run Periodically.

      In the Next boxes, type a date and time you want to start running this job on this schedule. To choose the date from a calendar, click the calendar icon.

      In the Every box, type a number and, in the drop-down list, choose a period.

      In the Do not run after boxes, type a date and time you want to stop running this job on this schedule. To choose the date from a calendar, click the calendar icon.

      If there are particular times during weekdays that you do not want this job to run, select Suspension Times for Content Crawler Jobs and select the beginning and end of the suspension times in the From and To drop-down lists, respectively. You might want to avoid running long, resource-intensive jobs during normal business hours so you do not slow down other jobs.

      Note:

      The suspension times do not affect crawler jobs that start before the beginning of the suspension time and are still running when the suspension time begins. Crawler jobs that are already running when the suspension time begins will continue normally.

Setting a Timeout Period for a Job

If you want this job to be stopped if it does not complete in a specific amount of time, you can set a timeout period for the job. If the job does not complete in the specified time, the portal asks the job to stop processing. If the job does not respond to this request within ten minutes, the portal forcibly stops the job.

To set a timeout period for a job:

  1. If the Job Editor is not already open, open it now.

  2. In the Timeout period box, type a number and, in the drop-down list, choose a period.

Setting a Job to Ignore Errors

By default, if an operation fails, the remaining operations associated with the job are not attempted. If you want the portal to attempt to run the other operations even if one operation fails, you can set the job to ignore errors.

To set a job to ignore errors:

  1. If the Job Editor is not already open, open it now.

  2. Select Ignore errors and run all operations.

Setting the Logging Level for a Job

To set the logging level for a job:

  1. If the Job Editor is not already open, open it now.

  2. In the Logging Level drop-down list, choose the amount of information you want to record in the job history logs:

    • Silent: no information is logged.

    • Low: only significant process information is logged.

    • Normal: high-level process information and outcomes are logged.

    • Verbose: All process information is logged. This level of logging will affect the performance of the portal, and should therefore be used only temporarily (for example, to troubleshoot a problem).

Saving Job Checkpoints

If this job includes content crawler operations that process information for long periods, you might want to record periodic notes in the log to show that the job is still running (you can view the job log for this job in the Job History page of this editor or for all in-process jobs through the Job History page of the Automation Service Manager).

Note:

This setting only applies to content crawler operations.

To save checkpoints for a job:

  1. If the Job Editor is not already open, open it now.

  2. Select Save checkpoints every and, in the box, type the number of minutes you want to wait between checkpoints.

Viewing Job Status and Job Logs

You can view a history for a job as well as the logs from each job on the Job History page of the Job Editor. You can view the same information for all jobs on the Job History page of the Automation Service Utility.

To view status and logs through the Job Editor you must have the following rights and privileges:

  • Access Administration activity right

  • At least Edit access to the job

To view status and logs through the Automation Service Utility you must be a member of the Administrators group.

To view job status and logs:

  1. Click Administration.

  2. Access the Job History page.

    • To access the Job History page through the Job Editor, open the folder in which the job is stored and click its name. Click Job History page.

    • To access the Job History page through the Automation Service Utility, in the Select Utility list, click Automation Service. Click Job History page.

  3. View the history of jobs that have run and the logs for individual jobs.

    • To view the detailed job log for a job, click the name of the job.

      The log appears in a dialog box.

    • To search the log, in the job log dialog box, enter a search term (using wildcards such as *) and click Search Log.

    • To limit the histories displayed on this page, in the View and to boxes, type the earliest and latest dates for which you want to view job histories and click >>.

      To choose the date from a calendar, click the Calendar icon.

    • To remove the filter clear the View and to boxes and click >>.

    • To refresh the job history data, click the Refresh icon.

    • To download a text file version of a detailed job log, click the Download icon to the far-right of the job name; when asked to open or save the file, click Save, specify a location in which to save the file, and click Save again.

Job History Information

The Job History page provides information about in-process and completed jobs.

Column Description

Job Name

Displays the name of the job. Click the job name to view the detailed job log.

Server

Displays the name of the Automation Service that ran the job.

Next Run

Displays the next date and time the job is scheduled to run.

Start

Displays the starting date and time for the last time the job ran.

Finish

Displays the ending date and time for the last time the job ran.

Status

Displays what happened when the job ran last:

  • Succeeded indicates that the job was able to complete.

  • Failed (in red text) indicates that the job experienced errors and was not able to complete.

  • In Process indicates that the job is running now.

  • Interrupted indicates that the job was terminated unexpectedly.

  • Suspended indicates that the job stopped before completing its work and will resume its work at the next scheduled run time.


Deleting Job Histories

On the Job History page of the Automation Service Utility, you can delete job histories from the database.

Note:

You cannot delete job histories from the Job Editor.

To access the Automation Service Utility you must be a member of the Administrators group.

  1. Click Administration.

  2. In the Select Utility list, click Automation Service.

  3. Click Job History page.

  4. To delete job histories from the database, in the Delete to box, type the latest date for which you want to delete histories and click >>.

    To choose the date from a calendar, click the Calendar icon.

    Any histories with this date or an earlier date are deleted from the database.

Aborting In-Process Jobs

You can stop a job that is processing on the Job History page of the Job Editor of the Automation Service Utility.

To abort an in-process job through the Job Editor you must have the following rights and privileges:

  • Access Administration activity right

  • At least Edit access to the job

To abort an in-process job through the Automation Service Utility you must be a member of the Administrators group.

To abort an in-process job:

  1. Click Administration.

  2. Access the Job History page.

    • To access the Job History page through the Job Editor, open the folder in which the job is stored and click its name. Click Job History page.

    • To access the Job History page through the Automation Service Utility, in the Select Utility list, click Automation Service. Click Job History page.

  3. To cancel a job, select the job and click Abort.

    Note:

    You cannot cancel jobs that have already completed. The check boxes next to completed jobs are unavailable (grayed out).