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
Cronjob is not running sanei05 UNIX for Advanced & Expert Users 2 06-19-2008 01:29 PM
Nested loop not running using cronjob bihani4u Shell Programming and Scripting 9 09-26-2007 11:19 AM
Shell script not running thru Cronjob gauravshrinivas Shell Programming and Scripting 8 11-03-2006 10:17 AM
Running scripts parallely santho UNIX for Dummies Questions & Answers 4 07-23-2006 12:42 PM
Variables are not getting exported while running the script in cronjob csaha Shell Programming and Scripting 7 03-21-2006 04:32 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-23-2008
jitu.jk jitu.jk is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 4
Running scripts through cronjob.

Hello everybody,

I'm trying to run a shell script in crontab file. But anyhow it's not getting executed. Following is the command that I've used in crontab.

30 07 * * * . ./.cronprofile;/om/reports/reportscripts/jitu/prod/prd_pre_to_post.sh
35 11 * * * . ../.cronprofile;/om/reports/reportscripts/jitu/prod/prd_cap_nw_conn.sh

both are not getting executed. Could anybody tell me where I'm going wrong ?
  #2 (permalink)  
Old 06-23-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,259
What error do you get? Any new mails in the box of the user concerning cron?
And maybe better put
Quote:
. ./.cronprofile
into the header of the scripts, just to be sure it is found.
  #3 (permalink)  
Old 06-23-2008
psiva_arul's Avatar
psiva_arul psiva_arul is offline
Registered User
  
 

Join Date: Jul 2007
Location: Bangalore, India
Posts: 97
Hi Jitu,

30 07 * * * . ./.cronprofile;/om/reports/reportscripts/jitu/prod/prd_pre_to_post.sh
35 11 * * * . ../.cronprofile;/om/reports/reportscripts/jitu/prod/prd_cap_nw_conn.sh

make sure that the prd_pre_to_post.sh shell script are uisng any ENV variable or not. if the script used any global variable you have to menstion in the script as well

one more things that the shell script (prd_pre_to_post.sh) is avalilabe or not in the spcefied directory (Path). if the script is availabe in the spcecified DIR try to execute by manually whethere its working or not?

Let me know if any concer on this again.

Regards,
MPS
Bangalore
  #4 (permalink)  
Old 06-23-2008
pramodmc pramodmc is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 3
Jitu,

You can debug using
30 07 * * * ksh -x . ./.cronprofile;/om/reports/reportscripts/jitu/prod/prd_pre_to_post.sh > /tmp/output1.txt
35 11 * * ksh -x * . ../.cronprofile;/om/reports/reportscripts/jitu/prod/prd_cap_nw_conn.sh > /tmp/output2.txt
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:14 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
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