Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 26 Jan 2007 @ 01:28:53 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: BTEQ not called by crontab in unix
 
From:   Anomy Anom

<-- Anonymously Posted: Thursday, January 25, 2007 19:45 -->

Mohd,

     * * * * * /a123b/tdscripts/abc.sh
              >> /a123b/tdscripts/hello1.log 2
              >> /a123b/tdscripts/hello1.log

This cron command execute the script every minute of every hour for every day of every month.

What your crontab did you place this? Part of root crontab or your own personal id crontab entry?

You could add

     . ./.profile

in your shell script just before bteq statement to be sure it pick up the profile information of the user where you scheduled the crontab entry.

If you can execute when you log in I am going to assume you have execute privilege. If you set up your crontab on another user id then that user id may not have correct privilege so chmod +x abc.sh may be in order to ensure that you, your group and public all have at least execute privileges to run this shell script. The command ls -l abc.sh will show you whether others have execute privileges on this shell script.

It may be wise to include the following as first line of your shell script - abc.sh:

     #!/usr/bin/ksh

Just so it will consistently execute from Korn shell. You can check for the result of your cron task by pg or cat /etc/cron.d/log for your task at the scheduled time.

Hope this helps.



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023