[Solved] Error while running on Cron


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting [Solved] Error while running on Cron
# 1  
Old 09-21-2010
[Solved] Error while running on Cron

All,

I am running one perl script from prompt and its running fine, but while putting it on cron gives below error,

Code:
DB-Library error:
        Could not open interface file.

# 2  
Old 09-21-2010
You have to load your environment for the cron job to be executed... e.g source your .profile or add your environment variables at the beginning of your script
# 3  
Old 09-21-2010
hey thanks vbe, set env variable on start of the script and it worked !
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Error while running a script through cron job

Hi Team, When i am running the below query manually it is giving me the right output i.e. export PATH=/usr/sbin:/usr/bin:/sbin:/bin:$PATH ADMIN=abc@abc.com CPU_HIGH=`sar|awk '{print $9}'|sort -n|head -5|sed -n 5p` CPU_MAX=`echo "scale=3; 100-$CPU_HIGH" | bc` CPU_LOW=`sar|awk '{print... (13 Replies)
Discussion started by: Ekamjot
13 Replies

2. Shell Programming and Scripting

[Solved] Shell not running through cron

Hi freinds, I have tried running a script through cron ,it is a shell script which calls a oracle procedure , problem here is that there is function in sql code which makes a external C call , this function is failing when running manually but works when run manually. I have trouble shooted... (6 Replies)
Discussion started by: Jcpratap
6 Replies

3. UNIX for Dummies Questions & Answers

[Solved] How to Check if a script is running?

Hi All, I am new to Unix... Can you please let me know how we can check if a script is running or not on Solaris box? (4 Replies)
Discussion started by: Rahul466
4 Replies

4. UNIX for Dummies Questions & Answers

[Solved] Cron - job to run every 3rd Friday of the month only

Hi Expert Please help me to set a cron job schedule, Ihave a job that run every 3rd Friday of the month at 1030am. I tried to set up like this, but the job still runs every friday at 1030am. I want the job to run every 3rd Friday of the month at 1030am only 30 10 15,16,17,18,19,20,21... (2 Replies)
Discussion started by: kaibiganmi
2 Replies

5. Solaris

Cron job running even after cron is removed

Hi , I have removed a cron for particular user , but cron job seems to be running even after the cron entry is removed. The purpose of the cron was to sendmail to user ( it uses mailx utility ) I have restarted cron and sendmail service still user is getting mail alerts from the cron job. And... (4 Replies)
Discussion started by: chidori
4 Replies

6. UNIX for Dummies Questions & Answers

Email Script not working when added to cron[solved]

Hi I have written an email script in python which sends email to the given id. I have customized the script for generating space alert inside a shell script as shown below df -h /microfocus > /tmp/spacereport ## Filter the %usage to variable per per=$(awk '{if (NR==3){print $4}}'... (0 Replies)
Discussion started by: rakeshkumar
0 Replies

7. Programming

error in running script in cron tab

Hi I am running the following script in cron tab: #!/usr/local/bin/php <?php $handle=fopen('xmlfile.xml',"w"); $xmlfile= file_get_contents('http://diur-plus.2me.co.il/xml.aspx'); fwrite($handle,$xmlfile); fclose($handle); /* * To change this template, choose Tools |... (1 Reply)
Discussion started by: programAngel
1 Replies

8. UNIX for Dummies Questions & Answers

Error while running the script through cron jobs .Please help me on this

Hi Everyone, I have written a korn shell script to shutdown my documentum docbase server and to restart it automatically on a weekly basis. My script is, When i execute this script manually, i was able to execute it successfully without any issues. I have scheduled this script in cronjob... (1 Reply)
Discussion started by: Sheethal
1 Replies

9. Shell Programming and Scripting

Cron job giving error while running SSH command

Hi All, The script which i am using to SSH to remote server is working fine when i run is using ./ but when cron runs it it gives error that "ssh: not found" please help!!! (3 Replies)
Discussion started by: visingha
3 Replies

10. Shell Programming and Scripting

error in running shell script in cron

#!/bin/bash CLASSPATH=. #CLASSPATH=${CLASSPATH}:${INSTALL_PATH}home/squidlog/CopyFile.java CLASSPATH=${CLASSPATH}:${INSTALL_PATH}usr/java/latest/lib/*.jar javac CopyFile.java echo "CLASSPATH=$CLASSPATH" #home/wbiadmin/JRE1.4.2/j2re1.4.2_15/bin/java CopyFile /usr/bin/java... (3 Replies)
Discussion started by: sari
3 Replies
Login or Register to Ask a Question