|
Home > Archive > Unix administration > March 2005 > cron job with pid: xxxx Failed
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
cron job with pid: xxxx Failed
|
|
| UnixShell 2005-03-04, 5:58 pm |
| AIX 5.2
Hello Everyone,
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
There is no other explanation in the log file as to why it failed. The
script has been running successfully via the cron every day for a long
time & nothing has changed. It ran successfully today, again, without
any change.
Is there any other place I can look at to find the exact cause? Does
anyone know what could have caused this?
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.
Is there a limit on the number of scripts I can run from the cron that
kick-off at the same time?
Thanks for any help in advance.
Suhas
| |
| Douglas R. Probst 2005-03-04, 5:58 pm |
| 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
and then check to see what is in the file.
the syntax it /path/to/script > /path/to/file 2>&1
Hope this helps
Doug
"UnixShell" <sgtembe@hotmail.com> wrote in message
news:1109968094.730319.113730@f14g2000cwb.googlegroups.com...
> AIX 5.2
>
> Hello Everyone,
>
> 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
>
> There is no other explanation in the log file as to why it failed. The
> script has been running successfully via the cron every day for a long
> time & nothing has changed. It ran successfully today, again, without
> any change.
>
> Is there any other place I can look at to find the exact cause? Does
> anyone know what could have caused this?
>
> 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.
>
> Is there a limit on the number of scripts I can run from the cron that
> kick-off at the same time?
>
> Thanks for any help in advance.
> Suhas
>
| |
| UnixShell 2005-03-04, 5:58 pm |
| Doug,
I already have the stdout & stderr redirected to a file as you have
mentioned, however no file for yesterday was created. I could see that
the time stamp on the file was from the day before, but not yesterday.
That is what is puzzling..It was as if the cron did not invoke the
script at all.
Thanks,
Suhas
| |
| Doug Freyburger 2005-03-04, 5:58 pm |
| 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.
| |
| aix@mail.com 2005-03-07, 5:55 pm |
| There is a limit of jobs running simultaneously from cron. By default,
the limit is 100. Check out /var/adm/cron/queuedefs. It is not a limit
of how many start at the same time, but how many are running at the
same time. See how many lines of output you get from the following.
# ps -ef|grep cron|grep -v grep|awk '{print $2}'|while read; do ps
-ef|grep $REPLY;done
|
|
|
|
|