The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > HP-UX
Google UNIX.COM
Home Forums Register Rules & FAQ Members List Arcade Search Today's Posts Mark Forums Read


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.


Other UNIX.COM Threads You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Weird Awk issue Khoomfire UNIX for Advanced & Expert Users 17 04-14-2008 04:13 AM
Weird crontab problem RobSand SUN Solaris 8 10-09-2007 02:12 PM
weird domain issue. thirddegreekris UNIX for Advanced & Expert Users 2 05-03-2007 09:42 PM
Crontab Issue rickyt00 UNIX for Dummies Questions & Answers 2 08-06-2005 06:31 AM
Weird SSH issue AKM UNIX for Advanced & Expert Users 6 11-08-2004 10:13 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-07-2008
Cameron's Avatar
Registered User
 

Join Date: Nov 2001
Location: Brisbane, Australia
Posts: 487
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Red face Weird Issue with crontab.

Hello all,
Normally I'm pretty comfortable with crontab, changing and updating (done it many-a-time).
But in the last two days I've been pulling my hair out over the following...

Details of OS:
HP-UX mdirect B.11.23 U ia64 2587410573 unlimited-user license

Issue:
Execute a script (very similar to two pre-existing scripts - which are working) from root's crontab ...
05 16 * * * * nice ksh -c /usr/local/bin/space_chk_3 >> /usr1/log/root/cronlog/space_chk_3.log 2>&1
However it is returning the following... "sh: KEY.txt: Execute permission denied." to the cronlog file output.
KEY.txt happens to be the first normal file in the root (/) directory.

In the /var/adm/cron/log file I see the following with previous run attempts I did earlier today ...
< root 27991 c Tue Apr 8 12:05:00 EST 2008 rc=126
< root 28748 c Tue Apr 8 12:10:00 EST 2008 rc=126
< root 29501 c Tue Apr 8 12:18:00 EST 2008 rc=126


I'm nuttered to understand why crontab for the root user is doing this.
Any suggestions/assistance apreciated.

I'm a little concerned that the answer is sitting right in front of me and I'm at present too blind to see the cause.

Last edited by Cameron : 04-21-2008 at 08:35 PM. Reason: Removal of script - not required or part of the solution.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-07-2008
Cameron's Avatar
Registered User
 

Join Date: Nov 2001
Location: Brisbane, Australia
Posts: 487
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Sad isn't it - one too many '*''s in the crontab entry.

Very sad - but fixed now.
Reply With Quote
  #3 (permalink)  
Old 04-21-2008
Tornado's Avatar
Registered User
 

Join Date: Nov 2006
Location: Melbourne
Posts: 240
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
I use this header at the top of the crontab file to help avoid such errors and make it easier to read

Code:
#Minute (0-59),
#|      Hour (0-23),
#|      |       Day of the month (1-31),
#|      |       |       Month of the year (1-12),
#|      |       |       |       Day of the week (0-6 with 0=Sunday).
#|      |       |       |       |       Commands
#|      |       |       |       |       |
#-------------------------------------------------------------------------------------------------------
So your crontab will look something like this:
Code:
# sudo crontab -l
#ident  "@(#)root       1.21    04/03/23 SMI"
#
# The root crontab should be used to perform accounting data collection.
#
#
#Minute (0-59),
#|      Hour (0-23),
#|      |       Day of the month (1-31),
#|      |       |       Month of the year (1-12),
#|      |       |       |       Day of the week (0-6 with 0=Sunday).
#|      |       |       |       |       Commands
#|      |       |       |       |       |
#-------------------------------------------------------------------------------------------------------
10      3       *       *       *       /usr/sbin/logadm
15      3       *       *       0       /usr/lib/fs/nfs/nfsfind
30      3       *       *       *       [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean
Reply With Quote
  #4 (permalink)  
Old 04-21-2008
Cameron's Avatar
Registered User
 

Join Date: Nov 2001
Location: Brisbane, Australia
Posts: 487
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Hi Tornado,
Novel header, thanks for the suggestion.
But really, I just have to open my eyes a little wider.

Cheers,
Cameron
Reply With Quote
Google UNIX.COM
Reply



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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



All times are GMT -7. The time now is 06:18 PM.


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

Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102