Unix/Linux Go Back    


AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

Crontab issue

AIX


Tags
aix, unix

Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 05-01-2011   -   Original Discussion by h@foorsa.biz
h@foorsa.biz's Unix or Linux Image
h@foorsa.biz h@foorsa.biz is offline
Registered User
 
Join Date: Jun 2008
Last Activity: 22 August 2017, 9:15 AM EDT
Posts: 568
Thanks: 7
Thanked 47 Times in 45 Posts
Crontab issue

Hi all,
I'm having a problem with a crontab entry execution for a non root user.
AIX version 5.3

Code:
user@host ~ $ oslevel -r
5300-10

cron status

Code:
user@host ~ $ ps -ef | grep cron
    root  377044       1   0   Oct 27      -  0:22 /usr/sbin/cron

cron entry for user


Code:
user@host ~ $ crontab -l
15 8 * * * * /home/user/checkout.sh

long listing for the script

Code:
user@host ~ $ ls -l checkout.sh
-r-x------    1 user   staff          1530 Apr 29 22:43 checkout.sh

viewing log /var/adm/cron/log

Code:
host:/>grep user /var/adm/cron/log
user    : CMD ( * /home/user/checkout.sh ) : PID ( 909476 ) : Sat Apr 30 08:15:00 2011
user... User unknown
user    : CMD ( * /home/user/checkout.sh ) : PID ( 1736796 ) : Sun May  1 08:15:00 2011
user... User unknown

content of /var/adm/cron.allow

Code:
host:/>cat /var/adm/cron/cron.allow
root
user


Code:
/var/adm/cron/cron.deny

has no entries at all

after all the script doesn't run and exit with above log entry
what's i'm missing
Sponsored Links
    #2  
Old Unix and Linux 05-01-2011   -   Original Discussion by h@foorsa.biz
pludi's Unix or Linux Image
pludi pludi is offline Forum Advisor  
Cat herder
 
Join Date: Dec 2008
Last Activity: 28 March 2014, 8:35 AM EDT
Location: Vienna, Austria, Earth
Posts: 5,521
Thanks: 38
Thanked 335 Times in 308 Posts
I'm not sure how it relates to the error message, but it seems you've got 1 field too many in your crontab. AFAIK there's 5 for the time (minute, hour, day of month, month, day of week) and then the command. You've got 6.
Sponsored Links
    #3  
Old Unix and Linux 05-01-2011   -   Original Discussion by h@foorsa.biz
bakunin's Unix or Linux Image
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
 
Join Date: May 2005
Last Activity: 10 December 2017, 6:03 PM EST
Location: In the leftmost byte of /dev/kmem
Posts: 5,647
Thanks: 109
Thanked 1,613 Times in 1,184 Posts
Quote:
Originally Posted by pludi View Post
I'm not sure how it relates to the error message, but it seems you've got 1 field too many in your crontab.
This is actually the very problem!

The sixth asterisk is interpreted as the name of the command to execute and "/home/user/checkout.sh" as its commandline argument.

I hope this helps.

bakunin
The Following User Says Thank You to bakunin For This Useful Post:
h@foorsa.biz (05-02-2011)
    #4  
Old Unix and Linux 05-02-2011   -   Original Discussion by h@foorsa.biz
h@foorsa.biz's Unix or Linux Image
h@foorsa.biz h@foorsa.biz is offline
Registered User
 
Join Date: Jun 2008
Last Activity: 22 August 2017, 9:15 AM EDT
Posts: 568
Thanks: 7
Thanked 47 Times in 45 Posts
@bakunin
You are right the sixth * were the problem
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Issue with crontab Sriranga Shell Programming and Scripting 12 06-24-2010 10:19 AM
crontab issue mac4rfree Shell Programming and Scripting 2 06-30-2009 06:51 AM
crontab issue crackthehit007 UNIX for Advanced & Expert Users 4 03-23-2009 12:32 AM
Crontab Issue rickyt00 UNIX for Dummies Questions & Answers 2 08-06-2005 10:31 AM
crontab issue Semper_Tempus Solaris 6 07-19-2005 11:13 PM



All times are GMT -4. The time now is 12:17 AM.