thanx dude

-----Original Message-----
From: Bob Showalter [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 27 August 2003 6:28 PM
To: Vema Venkata; [EMAIL PROTECTED]
Subject: RE: help;help


Vema Venkata wrote:
> Folks,
> Here the following xapipgm.pl is executed well when iam
> executing manualy,
> but when iam trying to set it thru corntab iam not able to execute
> 
> The crontab settings are as follows
> 
> 
> 1-59 * * * * . /home/paradigm/.profile;
> /proj/ahd02/CAisd/site/mods/scripts/xapipgm.pl >
> /proj/ahd02/CAisd/site/mods/scripts/log/init/ahdxapi.log
> 
> 
> The error iam getting is as follows
> 
> *****************************
> sh: log/init/ahdxapi.init.log: cannot create

This appears to be coming from the qx() line at the end of the script below.
You seem to be making assumptions about the current directory which are not
valid. Either use chdir() in your script to set the working directory, or
use a full path to your log file.

> *****************************
> 
> 
> **************************************************************
> ********************************
> #!/proj/ahd02/CAisd/ActivePerl-5.6.0.618/bin/perl
> #/usr/local/bin/perl
> $xapipgm = "srvtst26.pl";
> $ret = qx ( pgrep -f srvtst26);
> if ($? eq 0){
>   $ret = qx(pgrep - f $xapipgm);
>   print "AHD XAPI SERver ($xapipgm) Running with Process ID : $$"; } else
{
>   open F, ">> log/init/ahdxapi.init.log";

You don't check for errors here. I suspect this open is failing.

>   print F "AHDXAPI Server is now started running `localtime`";   close F;
>   $ret =qx(perl $xapipgm >>log/init/ahdxapi.init.log); }
> 
> **************************************************************
> **********************************************************


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

Reply via email to