Show Table of Contents
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:
- Switch to the root user, and run the following command to open the
crontabin a text editor:# crontab -e - 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
This entry runs the synchronization job randomly between 01:00 and 03:30, and discardsstdoutandstderrmessages from thecronutility. This prevents duplicating messages from thecdn-synccommand. Other options can be included as needed. See thecrontabmanual pageman crontabfor more information. - Exit the text editor to save the updated
crontabfile. 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.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.