Problems with Cron and isql


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Problems with Cron and isql
# 1  
Old 07-19-2010
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.

Code:
#!/usr/bin/ksh
. /opt/ivb/config/set_env

/usr/sybase/bin/isql -Usa -Pxxxx -Dxxx -cgo -o corestats.txt <<EOT

set rowcount 1
SELECT
    cdf_trfsddsdsstats_tbl.date as Date, sum(cdf_trfstats_tbl.succ_count) FROM
    trfstats_tbl
WHERE
        cdf_trfstats_tbl.cp = 23
go
quit
EOT

Any help would be much appreciated.

Santosh.
# 2  
Old 07-20-2010
Please show us the contents of set_env.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Problems with set up Cron

Hi I want to set up a cron for every 15 minutes between some hours. Can you tell whether the below command will work. Getting confuse because my time goes from night to next day morning. i want to setup 8 PM to next day 10 AM. */15 20-10 * * * sh abc.sh (1 Reply)
Discussion started by: raju2016
1 Replies

2. Shell Programming and Scripting

Execution problems with cron

I am new to creating crontab file , i just wrote below (40 19 * 3 * /root/maths/practisecron.sh), the script just prints "Hi". When ever i save the above file i am getting this . # crontab -e crontab: installing new crontab Can you please check where it went wrong.. (1 Reply)
Discussion started by: vkiyv05
1 Replies

3. UNIX for Dummies Questions & Answers

cron problems

I am trying to setup a cron that runs a script to update my ip for my domain name every time I reboot and checks if my ip changes every 5 minutes and if it does then I update it. I am running Ubuntu server 12.04. The file /etc/cron.d/ipupdate contains # # # Run ipupdate # # /5 * ... (3 Replies)
Discussion started by: Bros2
3 Replies

4. Shell Programming and Scripting

Execution Problems with Cron

Hi, I have written a shell script to transfer files to a SFTP server passing the filername, source and dest directory as parameters and it runs well. :) I want to schedule this script to run periodically using a cron job. root@pingu # cat /etc/crontab SHELL=/bin/bash... (1 Reply)
Discussion started by: chetancrsp18
1 Replies

5. Programming

execution problems with cron

how to store a date into file? and how we can access date from the file? ---------- Post updated at 06:09 AM ---------- Previous update was at 06:08 AM ---------- how we can store date in file? (1 Reply)
Discussion started by: causalmodi777
1 Replies

6. UNIX for Dummies Questions & Answers

Problems using rsync with cron

Hi, I've created a cron job for a script with a rsync command in it. The script is named pull.sh and contains the following line : What it is supposed to do is pull backup files from the production server of my company to my local server. It should also generate the log file (output.log)... (1 Reply)
Discussion started by: anaigini45
1 Replies

7. Shell Programming and Scripting

isql output file not created while running it through cron

#!/bin/ksh file="/pkgs/roots/scripts/ISQL_op.txt" isql -H 11.11.11.111:1111 -U myUser -P myPwd -o $file << eof go select * from Table1 go eof 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. ... (2 Replies)
Discussion started by: vikram3.r
2 Replies

8. HP-UX

unixODBC - Problems in the execution of isql

I installed the unixODBC driver but when I execute isql, returns the following error: ----- ERROR ----- Can't open lib '/usr/local/lib/libmyodbc3.sl' : Call to mmap() failed - TEXT /usr/local/lib/libmyodbc3.sl ERROR: Could not SQLConnect ----- DRIVER ----- /usr/local/lib usrv45: ls -la... (11 Replies)
Discussion started by: paulexpert
11 Replies

9. UNIX for Dummies Questions & Answers

cron problems

Hi there, this time a have a other problem :) i will start a script over the cron. if i start the script manual (per command) it works without any problems, but over the cron it doesent work. my cron looks like this: 26 15 * * * /path/scriptname.sh 2> /path/error.log there is no... (3 Replies)
Discussion started by: scotty
3 Replies

10. UNIX for Advanced & Expert Users

Cron problems

Hi, I am having a few problems with cron. I have created a shell script (to rotate www logs - this works) and then did the following (as root) #crontab -e 2 0 * * 3 /cron_scripts/wwwlogs.sh ? w ? q # crontab -l entry not shown e.g. it did not show what I had just writern I then... (6 Replies)
Discussion started by: warrend
6 Replies
Login or Register to Ask a Question