AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only
  • 1.  db2admin Crontab new entry not executed

    Posted Sat March 15, 2008 05:37 AM

    Originally posted by: chandru0078


    Dear All

    I have a question here.i have scheduled 1 script to be run very 8am.but the problem is the script not be executed.However i have tested the script manual and its working fine and generating output files.This scripts need to run as db2admin user under d2badmin crontab

    00 8 * * * /db2backup/CTFSCRIPT/ctf2.sh > /db2backup/CTFSCRIPT/ctf2.log

    -rwxrwxrwx 1 db2admin db2grp1 3442 Mar 15 16:44 ctf2.sh
    -rw-r--r-- 1 db2admin db2grp1 0 Mar 15 17:11 ctf2.log

    I guess we need do something on the db2admin .profile ? The ctf2.sh need to connect with db2 to generate output.please advised .Thank you in advance

    chandru0078
    #AIX-Forum


  • 2.  Re: db2admin Crontab new entry not executed

    Posted Sun March 16, 2008 09:31 AM

    Originally posted by: SystemAdmin


    Check db2admin mailbox for any errors that may have occurred during the crontab execution.
    #AIX-Forum


  • 3.  Re: db2admin Crontab new entry not executed

    Posted Mon March 17, 2008 04:30 AM

    Originally posted by: IBMFORUMS


    In the script ctf2.sh, do you specify the shell to be executed with?
    if it is ksh, you need to put the first line in the script:
    #!/usr/bin/ksh

    or, write the entry in crontab as:
    00 8 * * * /usr/bin/ksh /db2backup/CTFSCRIPT/ctf2.sh > /db2backup/CTFSCRIPT/ctf2.log

    second thing, if the script running under other user's crontab (not root), make sure that the user is allowed to run cron jobs.

    Message was edited by: IBMFORUMS
    #AIX-Forum