Re: cron.daily script is failing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If the cron job is setup correctly (hmmm???) it should send you an emailof any failures. If the script isn't sending failures then you have one or two options.

1) Alter the task to inlcude opening a file for writing, and have it write to the file as the script runs. Logging each step as it gose through it (eg Connecting to remote xxx.xxx.xxx.xxx)

2) Run the cron job with redirected output
here's an entry I use to query the modembanks. this is all on the same line (incase the email dose a line wrap)


0-59/5 * * * * root /etc/cron.hourly/modemcheck 2>>/var/log/err/modemcheck.err

--
robert


jg wrote:


Hi,
I have a script being called by cron.daily to be
executed every 24 hrs. at midnite.
(copies some web server logs over to a remote log
server via scp).

I have this exact same cron job & script running fine
on 2 of 4 systems, everything is identical with the 4
systems, word for word, line for line...

It works on 2 systems that are remote, they can copy
the logs over to the log server just fine.

On the 2 systems that are on the log servers local
LAN, the cronjob fails.
Well at least, it doesn't copy the logs over.
It's not appearing to be a communication issue, these
machines can see each other just fine, they scp with
no problem.

If I execute the script manually from command line, it
works fine, it SCP's the files over to the log server
just like it should.
But for some reason or other, cron.daily will not fire
this off.
Or if it is firing it off,  it is dying somewhere.

I don't know where else to look to see if there are
any particular errors.


My question is where can I look to see specifically the output/errors/results from the cron.daily job(s). And, any idea why this would fail, all the appropiate cards seem to be in place.

Here is a breakdown:

*System A - Works ok, logs get there - (Remote Srvr). *System B - Works ok, logs get there - (Remote Srvr).
*System C - Works manually, but not via cron.daily
*System D - Works manually, but not via cron.daily


*Log Server - gets the logs from Systems A & B every
nite at midnite, doesn't get anything from C & D.

Any idea ???????


__________________________________ Do you Yahoo!? Yahoo! Search - Find what you’re looking for faster http://search.yahoo.com




--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux