Thursday, May 2, 2013

CRON Example with setting Clearcase Environment

I am not an avid user of Clearcase but I recently had to use it in a CRON job.  First write your normal script.  Then I had to use this approach to get the script to work by setting the clearcase environment first.
This script sets the environment then calls the main scripts.

export PATH=/usr/atria/bin:$PATH

cleartool setview -exec "/home/k/kcastell/dp-mgt/scripts/" kevin_unix
cleartool setview -exec "/home/k/kcastell/dp-mgt/scripts/" kevin_unix

The "kevin_unix" is the name of my view in clearcase.

It is all based on the use of "exec" in each line.

No comments: