Re: cron job with pid: xxxx Failed

From: Doug Freyburger (dfreybur_at_yahoo.com)
Date: 03/05/05

  • Next message: Andrew: "Re: cryptographic file systems"
    Date: 4 Mar 2005 15:05:51 -0800
    
    

    UnixShell wrote:
    >
    > I was trying to investigate on why one of scripts did not run through
    > the cron yesterday & came across this entry in the cron log file
    under
    > /var/adm/cron:
    >
    > cron job with pid: xxxx Failed
    >
    > The
    > script has been running successfully via the cron every day for a
    long
    > time & nothing has changed.

    You think nothing has changed. Clearly you are missing
    something.

    > Is there any other place I can look at to find the exact cause? Does
    > anyone know what could have caused this?

    You mention that no log file is created. Look closely
    at the permissions on "." every directory from root to
    the script called by cron. Do the same for every
    directory to the log files.

    > The script that failed runs everyday @ 13:00. There are 9 other
    scripts
    > that also run via the cron at the same time. Out of the total 10
    > scripts that kick-off @ 13:00, four had a "failed" message & while
    the
    > remaining six had a "cron job with pid: xxxx Successful" message.

    Check all of them. Permissions have chaned somewhere.

    > Is there a limit on the number of scripts I can run from the cron
    that
    > kick-off at the same time?

    No limit.

    Now stepping back and thinking about the message
    "cron job with pid: xxx Failed". It means the script started,
    and that it exited with a value other than zero. So the
    permissions will at lesat allow it to run. Sounds like it
    bailed writing a log file or similar.

    Try changing the "#! /bin/ksh" in the first line of the
    script to include a "-x" or "-v" switch. Make sure the
    standard out goes to a file. Read that file to discover
    the failure point. Since -v and -x give different output,
    it could take trying each one per day.


  • Next message: Andrew: "Re: cryptographic file systems"

    Relevant Pages

    • Re: Log date
      ... It seems you can't use the "`" syntax because a crontab is not a script. ... If you had installed the mail command, you would have received a mail ... with the problem every time cron failed to execute your command. ... but what I would like is to create a log file with a date in the name ...
      (Ubuntu)
    • Re: Log date
      ... that the sript runs but no date on the log file ... It seems you can't use the "`" syntax because a crontab is not a script. ... If you had installed the mail command, you would have received a mail ... with the problem every time cron failed to execute your command. ...
      (Ubuntu)
    • Re: cron job with pid: xxxx Failed
      ... Do the script write a log or are there outputs sent to /dev/null. ... If the answer is /dev/null change the entry to redirect the output to a file ... > the cron yesterday & came across this entry in the cron log file under ... > There is no other explanation in the log file as to why it failed. ...
      (comp.unix.admin)
    • Re: cron job with pid: xxxx Failed
      ... Do the script write a log or are there outputs sent to /dev/null. ... If the answer is /dev/null change the entry to redirect the output to a file ... > the cron yesterday & came across this entry in the cron log file under ... > There is no other explanation in the log file as to why it failed. ...
      (comp.unix.aix)
    • Re: Query regarding cron jobs
      ... The script is getting executed a few times when scheduled through cron ... The probability of successful execution is 6/10. ... showing any entries crontab -l as the entry in /etc/cron.d is for root ...
      (RedHat)