此内容没有您所选择的语言版本。

Chapter 2. Automatically Synchronizing the Red Hat Satellite Server Repository


Manually synchronizing the Red Hat Satellite server repository with the Red Hat Content Delivery Network (CDN) can be an arduous task. The synchronization can be automated to occur randomly in a designated off peak window for best performance. You can use the cron utility to effectively automate synchronization.

Procedure 2.1. To Use the cron Utility to Automate Synchronization:

  1. Switch to the root user, and run the following command to open the crontab in a text editor:
    # crontab -e
    Copy to Clipboard Toggle word wrap
  2. Create a suitable job definition to schedule the synchronization. To create a random synchronization time, use the following entry:
    0 1 * * * perl -le 'sleep rand 9000' && cdn-sync --email >/dev/null 2>1
    Copy to Clipboard Toggle word wrap
    This entry runs the synchronization job randomly between 01:00 and 03:30, and discards stdout and stderr messages from the cron utility. This prevents duplicating messages from the cdn-sync command. Other options can be included as needed. See the crontab manual page man crontab for more information.
  3. Exit the text editor to save the updated crontab file. The new rules take effect immediately.

Note

The crontab file opens in vi by default. To change this behavior, change the EDITOR variable to the name of the text editor you prefer.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat