HI 
The following pl pgm executes when the process "srvtst26.pl "is  stopped.
It gets started automatically started thru crontab by command "ahdxapi.init"
what i want now is i want to write to a log file with time when it gets started 
"ahdxapi.init"
can any one help me on this

apprecitated ur earliest reply


xapipgm=srvtst26.pl
pgrep -f $xapipgm > /dev/null
                # runrc=$?
                # echo "Return Code is: $?"
if [ $? -eq 0 ]
then
        set `pgrep -f $xapipgm `
echo "AHD XAPI Server ($xapipgm) Running with Process Id: $1@ ahdxapi.init.$4$5"
else 
echo "AHD XAPI Server is now Started Running."

set `date '+%Y %m %d %H %M' `
xapipgm=srvtst26.pl
#echo "log: log/init/ahdxapi.init.$1$2$3.$4$5.log"
#echo "err: log/init/ahdxapi.init.$1$2$3.$4$5.err"
perl -w $xapipgm >log/init/ahdxapi.init.$1$2$3.$4$5.log 
2>log/init/ahdxapi.init.$1$2$3.$4$5.err

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to