有没有办法更改更新管理器检查更新的时间?

我知道在哪里设置频率,即每周,每天等,但不知道如何设置检查的时间。

Apt更新由名为/etc/cron.daily/apt的脚本触发。 /etc/cron.daily包含每天发生的几个脚本,但所有脚本都在同一时间发生。 为了更改Update Manager更新的时间,您需要更改所有/etc/cron.daily脚本启动时的时间。

为此,您需要编辑/etc/crontab文件:

 sudoedit /etc/crontab # or: gksu gedit /etc/crontab 

这是一个相当标准的cron文件,应该看起来像这样:

 # /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and files in /etc/cron.d. These files also have username fields, # that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # mh dom mon dow user command 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) # 

从这里我们可以在上午6:25看到cron.daily触发器。 如果你想在凌晨4点开始,你可以用以下代码替换第二行:

 0 4 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 

如果您需要更多关于格式的帮助,维基百科在Cron上有一个异乎寻常的技术页面 。

谢谢大家。 Amber代表我从我们的loco团队IRC频道提出的一个问题中提出这个问题。 我认为这是一个cron工作,并一直在挖掘他们(/etc/cron.*)试图自己解决这个问题。 所以现在我不会看到cpu使用率飙升,因为我正在看一些早间新闻video。

似乎有一个小时的时间转移。 我怀疑这是由于夏令时。 这是今天早上的剪辑。

 Apr 21 07:30:01 flounder CRON[21032]: (root) CMD (start -q anacron || :) Apr 21 07:30:01 flounder anacron[21035]: Anacron 2.3 started on 2011-04-21 Apr 21 07:30:01 flounder anacron[21035]: Will run job `cron.daily' in 5 min. Apr 21 07:30:01 flounder anacron[21035]: Will run job `cron.weekly' in 10 min. Apr 21 07:30:01 flounder anacron[21035]: Jobs will be executed sequentially Apr 21 07:35:01 flounder anacron[21035]: Job `cron.daily' started
Apr 21 07:30:01 flounder CRON[21032]: (root) CMD (start -q anacron || :) Apr 21 07:30:01 flounder anacron[21035]: Anacron 2.3 started on 2011-04-21 Apr 21 07:30:01 flounder anacron[21035]: Will run job `cron.daily' in 5 min. Apr 21 07:30:01 flounder anacron[21035]: Will run job `cron.weekly' in 10 min. Apr 21 07:30:01 flounder anacron[21035]: Jobs will be executed sequentially Apr 21 07:35:01 flounder anacron[21035]: Job `cron.daily' started 

标记这个解决了。