yum, crontab, and logwatch
Erik Hemdal
ehemdal at townisp.com
Sat Nov 20 23:30:19 UTC 2004
Hi Sharon:
>
> I'm trying to write a crontab entry to run yum update at 0100 and this is as
> far as I've got '0 1 * * * /usr/bin/yum update' but I'm unsure if this will
> work. Can anyone reassure me please, or if not, what is the correct syntax?
>
This looks like you are editing root's personal crontab using crontab
-e. Your entry is on track, but the following:
0 1 * * * /usr/bin/yum -y update
is better; without the -y, yum will wait for root to accept the updates
to be installed, but this won't happen via cron. -y assumes a yes answer
to the confirmation prompt, so the updates will be installed.
If you are running this in /etc/crontab, use the following:
0 1 * * * root /usr/bin/yum -y update
When I run it as a service, I seem to get logwatch updates only if it
fails, but I DO get notices via logwatch. You can edit the wordiness by
editing /etc/cron.daily/yum.cron. If you make your own cron entry as
you have asked, you need to add the appropriate options on the command
line (-e and -d come to mind as the right options).
Erik
More information about the users
mailing list