Avatar of funnymanmike
funnymanmikeFlag for Canada asked on

how can i see what cron jobs failed in solaris

1) im pretty new at this unix stuff

i have a list of cron jobs that are saposed to run every night

how can i tell what cron jobs failed? is there a log somewhere

Thanks
Unix OSSystem Programming

Avatar of undefined
Last Comment
funnymanmike

8/22/2022 - Mon
SOLUTION
ittogo

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
woolmilkporc

Hi,

add
MAILTO=[user@domain.tld]
at the top of your crontab.
Should your jobs produce any output on stdout or stderr, the above user will receive those data per mail.

wmp

omarfarid

by the way solaris crontab does not support

MAILTO=user@domain

and crontab jobs output is sent to user's mailbox

You may check /var/cron/log as ittogo mentioned and you can redirect stdout and stderr to files e.g.

* * * * * /path/to/script > /path/to/script.log 2>&1
ASKER
funnymanmike

Thanks ittogo:

i can see two scripts setup to run in the cron log

5 3 * * * csh /opt/davox/trs/scrx/pday_roll 1>/dev/null 2>&1
5 5 * * * csh /opt/davox/custom/scrx/crt_prvs_dy_camps.script 1>/dev/null 2>&1

but how the hell do i read this log, where can i see if there is an error

>  CMD: csh /opt/davox/trs/scrx/pday_roll 1>/dev/null 2>&1
>  davox 23074 c Tue Jan 20 03:05:00 2009
>  CMD: /usr/sbin/logadm
>  root 25511 c Tue Jan 20 03:10:00 2009
<  root 25511 c Tue Jan 20 03:10:01 2009
>  CMD: csh /opt/davox/trs/scrx/trs_raid 1>/dev/null 2>&1
>  davox 26065 c Tue Jan 20 03:15:00 2009
<  davox 26065 c Tue Jan 20 03:15:01 2009
>  CMD: [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean
>  root 26168 c Tue Jan 20 03:30:00 2009
>  CMD: csh /opt/davox/trs/scrx/trs_raid 1>/dev/null 2>&1
>  davox 26169 c Tue Jan 20 03:30:00 2009
<  root 26168 c Tue Jan 20 03:30:00 2009
<  davox 26169 c Tue Jan 20 03:30:01 2009
<  davox 23074 c Tue Jan 20 03:43:02 2009
>  CMD: csh /opt/davox/trs/scrx/trs_raid 1>/dev/null 2>&1
>  davox 29188 c Tue Jan 20 03:45:00 2009
<  davox 29188 c Tue Jan 20 03:45:01 2009
>  CMD: csh /opt/davox/trs/scrx/trs_raid 1>/dev/null 2>&1
>  davox 29256 c Tue Jan 20 04:00:00 2009
<  davox 29256 c Tue Jan 20 04:00:02 2009
>  CMD: csh /opt/davox/trs/scrx/trs_raid 1>/dev/null 2>&1
>  davox 29295 c Tue Jan 20 04:15:00 2009
<  davox 29295 c Tue Jan 20 04:15:01 2009
>  CMD: csh /opt/davox/trs/scrx/trs_raid 1>/dev/null 2>&1
>  davox 29336 c Tue Jan 20 04:30:00 2009
<  davox 29336 c Tue Jan 20 04:30:01 2009
>  CMD: csh /opt/davox/trs/scrx/trs_raid 1>/dev/null 2>&1
>  davox 29376 c Tue Jan 20 04:45:00 2009
<  davox 29376 c Tue Jan 20 04:45:01 2009 rc=1
>  CMD: csh /opt/davox/trs/scrx/trs_raid 1>/dev/null 2>&1
>  davox 29410 c Tue Jan 20 05:00:00 2009
<  davox 29410 c Tue Jan 20 05:00:02 2009
>  CMD: csh /opt/davox/custom/scrx/crt_prvs_dy_camps.script 1>/dev/null 2>&1
>  davox 29446 c Tue Jan 20 05:05:00 2009
<  davox 29446 c Tue Jan 20 05:13:47 2009
>  CMD: csh /opt/davox/trs/scrx/trs_raid 1>/dev/null 2>&1
>  davox 29470 c Tue Jan 20 05:15:00 2009
<  davox 29470 c Tue Jan 20 05:15:01 2009
>  CMD: csh /opt/davox/custom/scrx/check_dload_file 1>/dev/null 2>&1
>  davox 29506 c Tue Jan 20 05:20:00 2009

im a windows guy, and i just don't get it
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
SOLUTION
ittogo

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
funnymanmike

ittogo > simple answer, got the job done
Tintin > excellent explaination, gave me understanding

thanks all