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
crontab problem DebianJ UNIX for Advanced & Expert Users 11 05-22-2009 01:56 AM
Run crontab job problem ust UNIX for Advanced & Expert Users 3 07-23-2007 09:45 PM
Problem with Crontab qhuynh UNIX for Dummies Questions & Answers 5 09-15-2005 05:10 PM
Problem with crontab jcgg UNIX for Dummies Questions & Answers 5 10-31-2003 03:34 PM
crontab problem guest100 UNIX for Dummies Questions & Answers 19 03-31-2002 03:31 AM

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 01-05-2009
vinoo128 vinoo128 is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 14
Crontab problem

Hi all,
I made few changes to the script (under the directory mentioned in crontab) scheduled under crontab and the problem is that crontab doesnt pickup those changes and somehow runs the old copy of the script from somewhere.

Any help would be appreciated.
  #2 (permalink)  
Old 01-05-2009
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2005
Location: Switzerland - GE
Posts: 1,546
Thats more a question of PATH...
when you type :
which <script>; what does the system return?
  #3 (permalink)  
Old 01-05-2009
vinoo128 vinoo128 is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 14
i ran <which db_daily_export.sh> and it gives back:

/usr/bin/which: no db_daily_export.sh in (/usr/sbin:/orahome9i/app/oracle/product/9.2.0/bin:/orahome9i/app/oracle/product/9.2.0/OPatch:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/ora9i/bin)

but i specify the full path of the script in the crontab entry as below:

00 01 * * 1-5 /peel/scripts/db_daily_export.sh /u09 2>&1 > /dev/null
  #4 (permalink)  
Old 01-05-2009
vinoo128 vinoo128 is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 14
but when i give full path like

[/peel/scripts]$> which /peel/scripts/db_daily_export.sh
it gives
/peel/scripts/db_daily_export.sh
  #5 (permalink)  
Old 01-05-2009
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,100
You can't edit a crontab file. You need to use the crontab command. At this point, you should stop and restart cron so that it rereads the files.
  #6 (permalink)  
Old 01-05-2009
JerryHone JerryHone is offline
Registered User
  
 

Join Date: Nov 2006
Location: UK
Posts: 178
Quote:
crontab -e
to edit the cron file or
Quote:
crontab -l
to just list the content on standard output

Once you edit a cron file, you shouldn't need to bounce the cron process - it should pick up any changes straight away itself.

Jerry
  #7 (permalink)  
Old 01-06-2009
vinoo128 vinoo128 is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 14
Thats what i did .i edited the file using crontab -e and expect the cron job to pick up my changes when it runs the next time but somehow its not.
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 06:55 AM.


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