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.

#!/bin/ksh
export PATH=/usr/atria/bin:$PATH
HOME=/home/k/kcastell/dp-mgt
s_vobs=/vobs/webservices/DP

cleartool setview -exec "/home/k/kcastell/dp-mgt/scripts/SIcertreport.sh" kevin_unix
cleartool setview -exec "/home/k/kcastell/dp-mgt/scripts/Prodcertreport.sh" 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: