Account Links: Cart | Register | Log In

Skip to content

Red Hat Knowledgebase
Red Hat Knowledgebase Search
Article translations:
Currently Being Moderated

如何把errata升级任务计划在夜晚自动执行?

Article ID: 11511 - Created on: Jul 22, 2008 6:00 PM - Last Modified:  Oct 10, 2008 12:18 PM

目前无法通过红帽网络(RHN)来实现如上功能,可以通过设置CRONTAB来定时执行 up2date -u 命令。配置文件的格式可以参考如下。

 



field          allowed values
-----          --------------
minute         0-59
hour           0-23
day of month   1-31
month          1-12 (or names, see below)
day of week    0-7 (0 or 7 is Sun, or use names)

 

如果需要系统在午夜1点自自行运行,可以设置一个文件 update.txt ,文件内容如下?

 



0 1 * * * /usr/bin/up2date -u

 

然后使用如下命令把这个文件插入crontab 数据库。

 



crontab <filename>

 

操作过程和命令的样例如下:

 



$ crontab update.txt
$ crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (update.txt installed on Tue Jun  1 16:05:40 2004)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
0 1 * * * /usr/bin/up2date -u

 

Feedback from users like yourself is a critical factor in helping us make the Red Hat Knowledgebase as useful as possible.

More Like This

  • Retrieving data ...