The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
problem with cron job solne SUN Solaris 7 01-18-2008 04:57 PM
Cron problem tez UNIX for Dummies Questions & Answers 3 10-27-2006 02:48 PM
cron problem! blowtorch UNIX for Advanced & Expert Users 4 03-07-2006 09:12 PM
Problem with cron jhansrod AIX 2 11-25-2005 12:30 PM
cron problem VPN UNIX for Dummies Questions & Answers 2 04-16-2004 03:27 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-15-2003
Registered User
 

Join Date: Nov 2003
Location: Mumbai-India
Posts: 2
Stumble this Post!
Unhappy Cron Problem

Hello All,

One of my shell scripts was working fine till a few days back. It was scheduled in the cron. But yesterday i made some modifications to the script. The script works fine when i run it from the prompt. But it is not working when in runs from cron. Can someone help me out from this.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 11-15-2003
jsilva's Avatar
Registered User
 

Join Date: Apr 2003
Posts: 169
Stumble this Post!
Hi,

There're many reasons for that to happen... it can simply be some command that's not in the PATH when running from cron... to avoid this, always use the full path to the commands...
Try to redirect the output to some file and then see the results...
Reply With Quote
  #3 (permalink)  
Old 11-15-2003
kduffin's Avatar
UN1X
 

Join Date: Nov 2003
Location: Virginia
Posts: 441
Stumble this Post!
If the cron job produces any output to stdout or stderr, it will email the output to the user that the job runs as. Have you checked for mail output? It may provide a hint to the problem.

Cheers,
Keith

Last edited by kduffin; 11-17-2003 at 06:39 PM.
Reply With Quote
  #4 (permalink)  
Old 11-15-2003
Registered User
 

Join Date: Nov 2003
Location: HK
Posts: 53
Stumble this Post!
Try this:

If your platform is solaris, restart the cron daemon as follows:
/etc/rc2.d/S75cron stop
/etc/rc2.d/S75cron start

If your platform is HP, restart the cron daemon as follows:
/sbin/rc2.d/S730cron stop
/sbin/rc2.d/S730cron start

*Remember your system may has different number of the script. eg. S70cron etc.
simply type "grep -i cron *" in the path to find which script for stop/start cron daemon.

Hope it help.
__________________
tikual :)
Reply With Quote
  #5 (permalink)  
Old 11-16-2003
Registered User
 

Join Date: Nov 2003
Location: Mumbai-India
Posts: 2
Stumble this Post!
Smile THANKS

Thanks buddies,

Actually the ORACLE HOME path was set wrong in a profile file called by my program. I was connecting to a different instance of the database in the new script.

Thanks guys,
Raiden.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:35 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0