On AIX the file root is in /usr/spool/cron/crontabs which is linked to
/var/spool/cron/crontabs. You could search for the cron files using
find / -name cron* -print

You might also be aware that there *MAY* be cron jobs for different users,
e.g. in the cron directory there may be jobs which are run for the user adm
or another user. However, for ease of maintenance, I've usually only seen a
cron file for root. If the job has to run with permissions of an ordinary
user, the cron job would read something like this:

15 7 * * 1-5 su - username -c "/path/script" > /tmp/script.out 2>&1

This would run at 7:15 am, Monday to Friday, switch user to username,
adopting username's .profile and environmental variables (hence the - after
the su) and then run the script /path/script. Output from the cron job would
go to /tmp/script.out, including errors.

Anthony English

-----Original Message-----
From: Vema Venkata [mailto:[EMAIL PROTECTED]
Sent: Thursday, 21 August 2003 2:47 PM
To: Schubert, John [NTWK SVCS]; Dan Muey; Jeff Westman; beginners
Subject: RE: Cron jobs and perl


thanx for ur suggestion m8,i went to /var/cron but when iam trying to go to
log it is saying the following error

"ksh: log: not a directory"





-----Original Message-----
From: Schubert, John [NTWK SVCS] [mailto:[EMAIL PROTECTED]
Sent: Thursday, 21 August 2003 4:01 AM
To: Vema Venkata; Dan Muey; Jeff Westman; beginners
Subject: RE: Cron jobs and perl


Anytime you have problems with a cron, the easiest place to look first is in
the cronlog.  If you have root access, look at the file /var/cron/log (this
is Solaris, other *nix may have it elsewhere).  If you don't have root
access, delete my E-mail and I apoligize for intruding. :-)

In the cron log you will see if the command executed or if it failed out.
You may also note you "have mail", which may contain some useful info.
(again, this is all from a Solaris point of view).

Looking at your pasted entries, it looks ok, however running the .profile
first may be causing problems.

John

-----Original Message-----
From: Vema Venkata [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 19, 2003 10:00 PM
To: Dan Muey; Jeff Westman; beginners
Subject: Cron jobs and perl


Hi Dan 

The problem still persisits pls. help/suggest me what to do ?

When iam executing the xapipgm.pl it is getting executed properly but when
iam trying to execute thru crontab
it is not 

xapipgm.pl
**************************************************************
#!/bin/sh
  #myrun.shell
  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" 
 else 
  echo "AHD XAPI Server is now Started Running on
`date`.">log/init/ahdxapi.init.$1$2$3.$4$5.log
  set `date '+%Y %m %d %H %M' `
  xapipgm=srvtst26.pl
 perl -w $xapipgm > log/init/ahdxapi.init.$1$2$3.$4$5.log
2>log/init/ahdxapi.init.$1$2$3.$4$5.err
  #perl -w $4$5>log/init/ahdxapi.init
  fi
  
**************************************************************


Cron tab settings are as follows
____________________________________________________________________________
____________
* * * * * . /home/paradigm/.profile;
/proj/ahd02/CAisd/site/mods/scripts/xapipgm.pl >>
/proj/ahd02/CAisd/site/mods/scripts/log/init/ahdxapi.init.log  2>&1

____________________________________________________________________________
_____________

Access permsissons Details

In the following path i have

"/proj/ahd02/CAisd/site/mods/scripts"------------->Xapipgm.pl
"/proj/ahd02/CAisd/site/mods/scripts/log/init"------------->ahdxapi.init.log
and the access permission for log folder is drwxr-xr-x and init folder is
drwxr-xr-x.

And the log file name i.e (agdxapi.init.log) is -rwxrwxrwx




rgds
venkat

 
 


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


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

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

Reply via email to