The scheduler manages ClearCase jobs and arranges to run them at specified times. A job consists of an executable program, or task, that the scheduler runs one or more times with a given set of arguments. A task is a program that is available for scheduling. A job is a combination of a task with a schedule that specifies when and under what conditions the task actually runs. For a job to run, two conditions must exist:
The task must be defined for the scheduler.
A job that runs the task must be defined and given a schedule (and possibly other attributes).
This section discusses how ClearCase distinguishes and initializes tasks and jobs. For information on creating, editing, and deleting tasks and jobs, see Managing Tasks and Managing Jobs.
The scheduler relies on two data repositories:
A database of tasks available for scheduling
A database of jobs, or scheduled tasks
The database and the jobs, along with various other ClearCase administrative tools, are installed on the ClearCase LT server under the directory represented here as ccase-var-dir. On UNIX, this directory is /var/adm/atria. On Windows, the file is in ccase-home-dir\var.
A task must be defined in the task database before you can schedule it. The task database is a single text file ccase-var-dir\scheduler\tasks\task_registry. You can add task definitions to the task database by editing this file in a text editor. You must not change the definitions of standard ClearCase tasks, but you may add your own task definitions at the end of the file. For more information, see Managing Tasks.
Standard ClearCase tasks reside in the directory ccase-home-dir\config\scheduler\tasks. You cannot edit these tasks. Tasks that you define can reside anywhere in the file system, but the recommended location is the directory ccase-var-dir\scheduler\tasks. This directory initially contains two task placeholder scripts that run on a regular basis but by default do nothing. To change this default:
Edit ccase_local_day.[sh|bat] to add any user-defined operations to be run daily.
Edit ccase_local_wk.[sh|bat] to add user-defined tasks to be run weekly.
The database of jobs is a binary file (ccase-var-dir\scheduler\db) that you can read and edit only by using the Scheduled Jobs node of the ClearCase Administration Console or the cleartool schedule command. For more information, see Managing Jobs.
ClearCase installs a template for an initial task database, containing definitions for standard tasks, as the file ccase-home-dir\config\scheduler\tasks\templates\task_registry. The albd_server uses this template to create the first version of the actual task database, ccase-var-dir\scheduler\tasks\task_registry.
ClearCase installs templates for two customized tasks, ccase_local_day.bat and ccase_local_wk.bat, in the directory ccase-home-dir\config\scheduler\tasks\templates. The albd_server uses these templates to create initial versions of these tasks in the directory ccase-var-dir\scheduler\tasks.
ClearCase installs an initial set of job definitions as the text file ccase-home-dir\config\scheduler\initial_schedule. These job definitions rely on task definitions in the task registry template. The albd_server uses these job definitions to create the first version of the job database, ccase-var-dir\scheduler\db.
NOTE: Do not edit or delete any files on the ClearCase LT server in the directory tree whose root is ccase-home-dir\config\scheduler.
Each task runs in a separate process started by the albd_serveron the ClearCase LT server. A task has the following execution environment:
The task runs with the identity of root on UNIX and NT Authority\system on Windows.
The standard input stream is set to an empty file.
Standard output and error messages are redirected to a file and captured by the scheduler as part of the job's last completion information.
The current directory is undefined.
Environment variables are those in effect for the NT Authority\system identity on Windows and for root on UNIX. In addition, on Windows, ATRIAHOME is set to ccase-home-dir.
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |