AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  Crontab AIX 5.2 not working - help urgent

    Posted Wed November 12, 2008 12:08 AM

    Originally posted by: SystemAdmin


    Hi,

    I am new AIX. I have defined following entry in crontab in AIX 5.2

    33 04 * * * /usr/bin/date >> /tmp/toto.org
    root@mumsa001204:/var/adm/cron# date

    If I check cron process

    ps -ef|grep cron

    root 31672 1 0 Oct 10 - 0:06 /usr/sbin/cron
    root 118572 87956 0 21:05:21 pts/0 0:00 grep cron

    My problem is this /usr/bin/date >> /tmp/toto.org is not getting executing at all. Will you pl tell me where I am going wrong ?

    Thanks for urgent help.

    regards
    parag
    #AIX-Forum


  • 2.  Re: Crontab AIX 5.2 not working - help urgent

    Posted Wed November 12, 2008 12:48 PM

    Originally posted by: waynek


    It looks like you want the job to run at 4:33am. If this is true you should have it as 33 4 * * * /usr/bin/date >> /tmp/toto.org. The hour is a 24 hour clock. The hour should be a number from 0 to 23.
    #AIX-Forum


  • 3.  Re: Crontab AIX 5.2 not working - help urgent

    Posted Thu November 13, 2008 09:58 AM

    Originally posted by: brinaw


    Hi,

    The crontab entry looks ok - I've got AIX 5.2 systems with the hour field set to 06 instead of 6 and they work ok (even though the documentation says it should be 6).

    Take a look at the cron log file /var/adm/cron/log and look to see what happened at 04:33 when your job should have run. If there was an error logged, cron will also have emailed the output to the owner of the job, so call mail under that user and see if anything has been received.

    Hope this helps.
    #AIX-Forum


  • 4.  Re: Crontab AIX 5.2 not working - help urgent

    Posted Tue March 31, 2009 01:48 AM

    Originally posted by: SystemAdmin


    Hello,

    I had the same problem.
    I solved it by putting the script in /usr/local/bin
    I still don't have an explenation why, but now it works.

    Regards, Jack
    #AIX-Forum


  • 5.  Re: Crontab AIX 5.2 not working - help urgent

    Posted Tue March 31, 2009 02:44 AM

    Originally posted by: SystemAdmin


    Hi,

    Can you paste the output of following commands.

    1. ls -l /usr/bin/date
    2. crontab -l
    3. cat /var/adm/cron/log

    thanks
    Aleem
    #AIX-Forum


  • 6.  Re: Crontab AIX 5.2 not working - help urgent

    Posted Wed April 01, 2009 09:52 AM

    Originally posted by: Casey_B


    Hello,

    One common problem with cron is making changes to the crontab directly without notifying
    the cron daemon.

    You should use "crontab -e" or "crontab mylocalfilename" instead of editing the file directly.

    As you mentioned that you were new to AIX....
    Another thing to be aware of is to be careful with just typing "crontab"
    It will accept input from standard in, and you may accidentally remove your crontab.
    (I have done that a few times by accident...)
    Hope this helps,
    Casey

    ps: Since you said you were new to AIX, here is another tip from personal experience:
    There is no command line help for shutdown...Don't even try to look for it, use the man page. :)
    #AIX-Forum