Show Table of Contents
Chapter 2. Automatic Synchronization
Manually synchronizing the RHN Satellite Server repository with Red Hat Network can be an arduous task. Synchronization can be automated so that it occurs in non-peak times, such as the late evening or early morning to better balance load and ensure faster synchronization. Synchronization should occur randomly for best performance. The most effective way to automate synchronization is using
cron.
Procedure 2.1. Automating Synchronization
- Switch to the root user, and open the
crontabin a text editor:crontab -e
Note
Thecrontabwill open in vi by default. To change this behavior, change theEDITORvariable to the name of the text editor you prefer. - In the
crontab, use the first five fields (minute, hour, day, month, and weekday) to schedule the synchronization. To create a random synchronization time, use the following entry:0 1 * * * perl -le 'sleep rand 9000' && satellite-sync --email >/dev/null 2>1
Thiscrontabentry will run the synchronization job randomly between 01:00 and 03:30. It will discardstdoutandstderrfromcronto prevent duplicating the messages fromsatellite-sync. Other options can be included as needed. - To save the
crontab, simply exit from the text editor. The newcronrules will be put in to place immediately.

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.