Visit Our UNIX and Linux User Community

isql output file not created while running it through cron

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting isql output file not created while running it through cron
# 1  
Old 11-05-2009
isql output file not created while running it through cron

isql -H -U myUser -P myPwd -o $file << eof
select * from Table1

my cron entry
00 08 03 11 * /pkgs/roots/scripts/testc.ksh

file permission of the script is correct, i have used absolute path everywhere.

The script runs fine, in standalone mode.

but while executing through cron the isql output file is not getting generated.

Please help me find the issue and its resolution.
# 2  
Old 11-05-2009
i have used absolute path everywhere.

but for isql command you have not specified absolute path.

In debian kind of system, you are likely to see what is the error in syslog.
# 3  
Old 11-05-2009

How can i find the absolute path of isql command. ?
what command will get the default absolute path of isql command.

Previous Thread | Next Thread
Test Your Knowledge in Computers #32
Difficulty: Easy
There are 9 pins in a basic serial port.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Unable to get output in mail body after running cron

I have prepared script to get the file details everyday and send mail. while running bash script manually , it sends output in body . but does not send through cron. cron sends only subject . I believe have to use some wait or sleep syntex. to complete first . please help. #!/bin/bash ls... (10 Replies)
Discussion started by: yash_message
10 Replies

2. Shell Programming and Scripting

Running same script through cron gives different output

Hi All, I am running the below shell script through cron and surprisingly it gives different output $uname -a Linux 2.6.18- #1 SMP Fri Jul 30 00:08:45 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux $ echo $SHELL /bin/bash shell script: cat #!/bin/bash ... (10 Replies)
Discussion started by: a1_win
10 Replies

3. Shell Programming and Scripting

Issue with redirecting a ISQL output to a file

Hi all, I have wrote a script to redirect the output of Sybase query to a file. Its a single XML message i am fetching with sybase query. The problem i faced here is the XML message line crosses the normal line limit in unix. Could some please help me how to get complete xml message... (1 Reply)
Discussion started by: ravin
1 Replies

4. Shell Programming and Scripting

Problems with Cron and isql

Dear Friends, I am running a script which runs a select query from a sybase table and outputs the result (1 row) into a .txt file in unix. When I run the script manually it behaves normally. However it doesnt run in crontab. #!/usr/bin/ksh . /opt/ivb/config/set_env ... (1 Reply)
Discussion started by: santoshpayal
1 Replies

5. Shell Programming and Scripting

Running script file using cron job every 5 second

Hi All, I beginner in unix, i have no idea how to set the script file using cron job every 5 second. I also want to execute automatically the output to text file.This is my script name and my textfile abc.txt. (6 Replies)
Discussion started by: mastercar
6 Replies

6. Shell Programming and Scripting

Script not running from cron it gives blank output

Hi, I have ascript which drops a mail with the jobs status. here is the script: #!/bin/ksh mypath=/home/gaddamja flashlogpath=/sbcimp/dyn/data/flash/log cd $mypath v1=`ls -lrt | grep -i checkFilesForAmber_EUR1. |tail -1 | awk '{print $8}'` v2=`cat $v1` cd $flashlogpath ... (1 Reply)
Discussion started by: jagadish_gaddam
1 Replies

7. Shell Programming and Scripting

isql output

hi all i m running following code # set up environment . /u/pimms/pimms_global.ksh echo "Get record from database" #echo ${PIMMS_ID} #echo ${PIMMS_PWD} #echo "1" isql -U${PIMMD_ID} -P${PIMMS_PWD} -S$SRV << eof > /sybase/applications/pimms/bin/automate1.txt use pimms ... (6 Replies)
Discussion started by: d_swapneel14
6 Replies

8. Shell Programming and Scripting

total output from a file created in a while loop

I have a while loop which looks for files and then sets a variable to give me the record count of each file: current_members=`wc -l ${DATA_DIR}/$MEMBERS_FILENAME | nawk '{ printf "%d\n", $0}'` I am out putting the totals into a file: echo $current_members >> ../data/out_total_members.dat ... (7 Replies)
Discussion started by: Pablo_beezo
7 Replies

9. Solaris

Created cron.allow file and now email fails

Getting ready for Sarbanes Oxley and I was told that I need to create a cron.allow file for the box so that only specified users can create cron jobs. That was easy enough, and I put in all the accounts that had scheduled cron jobs such as: root lp My oracle account A couple of programmer... (1 Reply)
Discussion started by: citrowske
1 Replies

10. UNIX for Dummies Questions & Answers

running isql 'ace' report from command line

Hi, My systems manager wrote some reports using isql's 'ace' reporting program. He wants me to run these monthly from cron. Can this be done? can I run these reports from the command line(from a shell script)? Thanks! (0 Replies)
Discussion started by: pugsly62
0 Replies

Featured Tech Videos