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?
I know that I can run it as a 'service' but that means that it runs at the same time as logwatch and it then doesn't get recorded in logwatch, so I'm hoping that if I run it in advance of logwatch, then logwatch will record it.
Sharon.
On 11/20/2004 07:59 AM, Sharon Kimble wrote:
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?
I know that I can run it as a 'service' but that means that it runs at the same time as logwatch and it then doesn't get recorded in logwatch, so I'm hoping that if I run it in advance of logwatch, then logwatch will record it.
Simply take /etc/cron.daily/yum.cron and move it to /usr/local/bin. Edit it to remove the if/fi block. Then your crontab entry would be:
0 1 * * * /usr/local/bin/yum.cron
This is all that would be left of yum.cron:
#!/bin/sh /usr/bin/yum -R 10 -e 0 -d 0 -y update yum /usr/bin/yum -R 120 -e 0 -d 0 -y update
.../Ed
Ed Wilts, RHCE wrote:
On 11/20/2004 07:59 AM, Sharon Kimble wrote:
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?
I know that I can run it as a 'service' but that means that it runs at the same time as logwatch and it then doesn't get recorded in logwatch, so I'm hoping that if I run it in advance of logwatch, then logwatch will record it.
Simply take /etc/cron.daily/yum.cron and move it to /usr/local/bin. Edit it to remove the if/fi block. Then your crontab entry would be:
0 1 * * * /usr/local/bin/yum.cron
This is all that would be left of yum.cron:
#!/bin/sh /usr/bin/yum -R 10 -e 0 -d 0 -y update yum /usr/bin/yum -R 120 -e 0 -d 0 -y update
.../Ed
Thanks Ed, this worked pefectly :)
Sharon.
On Sat, 2004-11-20 at 13:59 +0000, Sharon Kimble wrote:
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.
Yum comes pre-installed with a way to enable automatic updates:
/sbin/chkconfig --level 345 --add yum
See /etc/rc.d/init.d/yum and /etc/cron.daily/yum.cron for details.
Stephen Walton wrote:
On Sat, 2004-11-20 at 13:59 +0000, Sharon Kimble wrote:
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.
Yum comes pre-installed with a way to enable automatic updates:
/sbin/chkconfig --level 345 --add yum
See /etc/rc.d/init.d/yum and /etc/cron.daily/yum.cron for details.
I read the details in those 2 files, and it talks about a "nightly update". Is there a way to choose when it will update, or does it do it at midnight, or what?
Thanks, Bob
On Saturday 04 December 2004 09:05, Bob Rowlands wrote:
See /etc/rc.d/init.d/yum and /etc/cron.daily/yum.cron for details.
I read the details in those 2 files, and it talks about a "nightly update". Is there a way to choose when it will update, or does it do it at midnight, or what?
The scripts in /etc/cron.daily will run according to the times specified in the table found in /etc/crontab.
Regards, Mike Klinke
Mike Klinke wrote:
On Saturday 04 December 2004 09:05, Bob Rowlands wrote:
See /etc/rc.d/init.d/yum and /etc/cron.daily/yum.cron for details.
I read the details in those 2 files, and it talks about a "nightly update". Is there a way to choose when it will update, or does it do it at midnight, or what?
The scripts in /etc/cron.daily will run according to the times specified in the table found in /etc/crontab.
Regards, Mike Klinke
Just what I needed. Thank you.