The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
a cron job needs a perl script to execute Exader UNIX for Dummies Questions & Answers 2 04-22-2008 03:45 PM
problem when the script is scheduled to run as cron job forumthreads UNIX for Dummies Questions & Answers 6 07-19-2007 12:27 PM
CRON problem using script... Sorrento Shell Programming and Scripting 0 10-14-2005 12:48 PM
problem with a script and the cron pascalbout AIX 1 10-13-2005 09:42 AM
cron job problem with csh script fung_donald Shell Programming and Scripting 3 04-11-2002 10:15 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-30-2007
izai izai is offline
Registered User
  
 

Join Date: May 2007
Posts: 3
script execute by cron problem, but manual ok

Hi;

I'm facing the problem with my script like below

30 0 * * * /data/SCRIPT/LOADLOGS/loadata1.sh 2 1 >> /tmp/loaddata.txt

loadata1.sh calling a another 2 scripts which we need to exe in sequence.
when it perform by cron jon, sometimes it just can process 20 recs or less or nothing but when we re-run each scripts manually, it found 100 recs.

anyone has an experience before ? is it because of the cron or the script itself ? but we execute exactly the same script for both by cron or manual.

pls help... thanks in advance
  #2 (permalink)  
Old 05-30-2007
vgersh99's Avatar
vgersh99 vgersh99 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,116
look into this FAQ
  #3 (permalink)  
Old 05-30-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
1. The executing user should get emails if any stdout or stderr was produced.

And in the environment your script runs (exec'd by cron and with minimal environment).....

2. check your paths (PATH, LD_LIBRARY_PATH etc)

3. check your environment
  #4 (permalink)  
Old 05-30-2007
izai izai is offline
Registered User
  
 

Join Date: May 2007
Posts: 3
just little bit confused..

if the env or path problem, my cron should unable to process at all any recs,
am i right ??
but it seems like inconsistent problem..


Quote:
Originally Posted by porter
1. The executing user should get emails if any stdout or stderr was produced.

And in the environment your script runs (exec'd by cron and with minimal environment).....

2. check your paths (PATH, LD_LIBRARY_PATH etc)

3. check your environment
  #5 (permalink)  
Old 05-30-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by izai
if the env or path problem, my cron should unable to process at all any recs,
am i right ??
We don't know what's in your script.
  #6 (permalink)  
Old 05-31-2007
izai izai is offline
Registered User
  
 

Join Date: May 2007
Posts: 3
our script quite complicated to explain in here.. anyway.. thanks for the reply, will check on the env and path, etc.
  #7 (permalink)  
Old 06-01-2007
bh_hensem bh_hensem is offline
Registered User
  
 

Join Date: May 2007
Posts: 7
write a full path of the script which u have called.. then it ok...
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 05:40 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0